diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2011-07-11 22:56:07 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2011-07-11 22:56:07 +0200 |
commit | 29bbefe42883a660c6769f042e7bafdf151d720b (patch) | |
tree | 9b710603c8e4917c48364d220fe3a238110eb7ae /udev/udevd.c | |
parent | 18b53db8401592fb7c21f2bbd442bc2fb0f27f0b (diff) |
udevd: use 'uptime' in debug timestamp
Diffstat (limited to 'udev/udevd.c')
-rw-r--r-- | udev/udevd.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/udev/udevd.c b/udev/udevd.c index e7384e19a2..968b41667e 100644 --- a/udev/udevd.c +++ b/udev/udevd.c @@ -55,13 +55,12 @@ static void log_fn(struct udev *udev, int priority, { if (debug) { char buf[1024]; - struct timeval tv; - struct timezone tz; + struct timespec ts; vsnprintf(buf, sizeof(buf), format, args); - gettimeofday(&tv, &tz); + clock_gettime(CLOCK_MONOTONIC, &ts); fprintf(stderr, "%llu.%06u [%u] %s: %s", - (unsigned long long) tv.tv_sec, (unsigned int) tv.tv_usec, + (unsigned long long) ts.tv_sec, (unsigned int) ts.tv_nsec/1000, (int) getpid(), fn, buf); } else { vsyslog(priority, format, args); |