r23357: timespec_current() was returning the wrong ns time
authorJeremy Allison <jra@samba.org>
Tue, 5 Jun 2007 19:17:05 +0000 (19:17 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:23:09 +0000 (12:23 -0500)
(multiplying tv_sec, not tv_usec).
Jeremy.

source/lib/time.c

index ee44f5eb1349980bf2dcf9d9ee1256def3a23e07..a703066248eba6425d964e054fabbcda9afd6591 100644 (file)
@@ -1111,7 +1111,7 @@ struct timespec timespec_current(void)
        struct timespec ts;
        GetTimeOfDay(&tv);
        ts.tv_sec = tv.tv_sec;
-       ts.tv_nsec = tv.tv_sec * 1000;
+       ts.tv_nsec = tv.tv_usec * 1000;
        return ts;
 }