mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
s3: use clock_gettime() in timespec_current()
This commit is contained in:
parent
3df1037a74
commit
8589f46b86
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user