mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2026-04-09 08:21:30 -04:00
connection: print debug time mod 10000 seconds, not mod 2^32 µs
This makes it easier to compare WAYLAND_DEBUG output with timestamps from other sources. Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
This commit is contained in:
parent
d81525a235
commit
8198e0c827
1 changed files with 3 additions and 3 deletions
|
|
@ -1547,7 +1547,7 @@ wl_closure_print(struct wl_closure *closure, struct wl_object *target,
|
||||||
struct argument_details arg;
|
struct argument_details arg;
|
||||||
const char *signature = closure->message->signature;
|
const char *signature = closure->message->signature;
|
||||||
struct timespec tp;
|
struct timespec tp;
|
||||||
unsigned int time;
|
uint64_t time;
|
||||||
uint32_t nval;
|
uint32_t nval;
|
||||||
FILE *f;
|
FILE *f;
|
||||||
char *buffer;
|
char *buffer;
|
||||||
|
|
@ -1558,10 +1558,10 @@ wl_closure_print(struct wl_closure *closure, struct wl_object *target,
|
||||||
return;
|
return;
|
||||||
|
|
||||||
clock_gettime(CLOCK_REALTIME, &tp);
|
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] ",
|
fprintf(f, "%s[%7u.%03u] ",
|
||||||
color ? WL_DEBUG_COLOR_GREEN : "",
|
color ? WL_DEBUG_COLOR_GREEN : "",
|
||||||
time / 1000, time % 1000);
|
(unsigned int)(time / 1000), (unsigned int)(time % 1000));
|
||||||
|
|
||||||
#if defined(HAVE_GETTID)
|
#if defined(HAVE_GETTID)
|
||||||
if (include_tid < 0) {
|
if (include_tid < 0) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue