ntp_gettime(2)
NAME
ntp_gettime − get local clock values
SYNOPSIS
#include <sys/timex.h>
int ntp_gettime(struct ntptimeval ∗tptr )
DESCRIPTION
ntp_gettime reads the local clock value and dispersion, returning the information in tptr.
struct ntptimeval {
struct timeval time; /∗ current time (ro) ∗/
int32_t maxerror; /∗ maximum error (us) (ro) ∗/
int32_t esterror; /∗ estimated error (us) (ro) ∗/
};
RETURN VALUES
ntp_gettime returns:
0 On success
-1 On failure
ntp_gettime sets errno to the following:
EFAULT if tptr points to an invalid address
SEE ALSO
SunOS 5.6 — Last change: 28 Jan 1997