diff options
| author | Konstantin Belousov <kib@FreeBSD.org> | 2010-01-05 12:32:09 +0000 |
|---|---|---|
| committer | Konstantin Belousov <kib@FreeBSD.org> | 2010-01-05 12:32:09 +0000 |
| commit | 3354257d950ed739495b44fbae5a0103d7b673a1 (patch) | |
| tree | f2c049dc52f2289d8a265c1656309de96caedd7d /lib/libc/gen/time.c | |
| parent | eee4cfb98fc1b3185d3bea1aad559feba31ee4c6 (diff) | |
Notes
Diffstat (limited to 'lib/libc/gen/time.c')
| -rw-r--r-- | lib/libc/gen/time.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/libc/gen/time.c b/lib/libc/gen/time.c index 840f9b6b7bcc..214dfce1bb8e 100644 --- a/lib/libc/gen/time.c +++ b/lib/libc/gen/time.c @@ -37,13 +37,12 @@ __FBSDID("$FreeBSD$"); #include <sys/time.h> time_t -time(t) - time_t *t; +time(time_t *t) { - struct timeval tt; + struct timespec tt; time_t retval; - if (gettimeofday(&tt, (struct timezone *)0) < 0) + if (clock_gettime(CLOCK_SECOND, &tt) < 0) retval = -1; else retval = tt.tv_sec; |
