summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/time.c
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2010-03-04 13:35:57 +0000
committerdes <des@FreeBSD.org>2010-03-04 13:35:57 +0000
commit834fb25a9ed2240101506d137b5be7d71c75f306 (patch)
tree4002c72cd1ed11909f7640bea343988cfcf63c5b /lib/libc/gen/time.c
parent98b742f57cafbed05c101e60cc131f5980f044d0 (diff)
parent787cf8d03f1c58ada088933408f30fd63de85bf2 (diff)
downloadFreeBSD-src-834fb25a9ed2240101506d137b5be7d71c75f306.zip
FreeBSD-src-834fb25a9ed2240101506d137b5be7d71c75f306.tar.gz
IFH@204581
Diffstat (limited to 'lib/libc/gen/time.c')
-rw-r--r--lib/libc/gen/time.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/libc/gen/time.c b/lib/libc/gen/time.c
index 840f9b6..214dfce 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;
OpenPOWER on IntegriCloud