blob: e4bd0de3dd24deb0196cbaa4e0d17f6361493fff (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "ntp_syslog.h"
#include "ntp_stdlib.h"
#include "ntp_unixtime.h"
#include "clockstuff.h"
int
gettimeofday(
struct timeval * tv,
void * ignored
)
{
struct timespec ts;
UNUSED_ARG(ignored);
getclock(TIMEOFDAY, &ts);
tv->tv_sec = ts.tv_sec;
tv->tv_usec = ts.tv_nsec / 10;
return 0;
}
|