summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/time.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/source3/lib/time.c b/source3/lib/time.c
index 71d6587199..fad5d97cb1 100644
--- a/source3/lib/time.c
+++ b/source3/lib/time.c
@@ -356,11 +356,8 @@ struct timeval convert_timespec_to_timeval(const struct timespec ts)
struct timespec timespec_current(void)
{
- struct timeval tv;
struct timespec ts;
- GetTimeOfDay(&tv);
- ts.tv_sec = tv.tv_sec;
- ts.tv_nsec = tv.tv_usec * 1000;
+ clock_gettime(CLOCK_REALTIME, &ts);
return ts;
}