System Calls ntpgettime(2)
NAME
ntpgettime - get local clock values
SYNOPSIS
#include
int ntpgettime(struct ntptimeval *tptr);
DESCRIPTION
The ntpgettime() function reads the local clock value and
dispersion, returning the information in tptr.
The ntptimeval structure contains the following members:
struct ntptimeval {
struct timeval time; /* current time (ro) */
int32t maxerror; /* maximum error (us) (ro) */
int32t esterror; /* estimated error (us) (ro) */
};
RETURN VALUES
Upon successful completion, ntpgettime() returns the
current clock state (see ). Otherwise, it
returns -1 and sets errno to indicate the error.
ERORS
The ntpgettime() function will fail if:
EFAULT The tptr argument points to an invalid address.
The ntpgettime() function will fail for 32-bit interfaces
if:
EOVERFLOW The size of the time.tvsec member of the
ntptimeval structure pointed to by tptr is too
small to contain the correct number of seconds.
SEE ALSO
xntpd(1M), ntpadjtime(2)
SunOS 5.11 Last change: 9 Nov 1999 1
|