Merge branch 'debug-retime' into 'main'

connection: print debug time mod 10000 seconds, not mod 2^32 µs

See merge request wayland/wayland!430
This commit is contained in:
M. Stoeckl 2025-10-09 10:31:19 +00:00
commit 7ff7d3e354

View file

@ -1547,7 +1547,7 @@ wl_closure_print(struct wl_closure *closure, struct wl_object *target,
struct argument_details arg;
const char *signature = closure->message->signature;
struct timespec tp;
unsigned int time;
uint64_t time;
uint32_t nval;
FILE *f;
char *buffer;
@ -1558,10 +1558,10 @@ wl_closure_print(struct wl_closure *closure, struct wl_object *target,
return;
clock_gettime(CLOCK_REALTIME, &tp);
time = (tp.tv_sec * 1000000L) + (tp.tv_nsec / 1000);
time = ((tp.tv_sec % 10000LL) * 1000000LL) + (tp.tv_nsec / 1000);
fprintf(f, "%s[%7u.%03u] ",
color ? WL_DEBUG_COLOR_GREEN : "",
time / 1000, time % 1000);
(unsigned int)(time / 1000), (unsigned int)(time % 1000));
#if defined(HAVE_GETTID)
if (include_tid < 0) {