CLOCK_MONOTONIC (which we previously used) is reset
when the system is rebooted.
CLOCK_REALTIME is a "wall clock" time. It's still affected by NTP
changes (for Linux we should probably use CLOCK_TAI instead
but that is Linux-specific). For most systems CLOCK_REALTIME
will be good enough.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
uint8_t rval;
/* Start with the system clock. */
- clock_gettime_mono(&itime);
+ itime = timespec_current();
/* Convert to NTTIME. */
tval = unix_timespec_to_nt_time(itime);