ntp_gettime man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

NTP_GETTIME(2)		    BSD System Calls Manual		NTP_GETTIME(2)

NAME
     ntp_gettime — NTP user application interface

LIBRARY
     Standard C Library (libc, -lc)

SYNOPSIS
     #include <sys/timex.h>

     int
     ntp_gettime(struct ntptimeval *ntv);

DESCRIPTION
     The time returned by ntp_gettime() is in a timespec structure, but may be
     in either microsecond (seconds and microseconds) or nanosecond (seconds
     and nanoseconds) format.  The particular format in use is determined by
     the STA_NANO bit of the status word returned by the ntp_adjtime() system
     call.  ntp_gettime() has as argument a pointer to the ntptimeval struc‐
     ture with the following members:

     struct ntptimeval {
	     struct timespec time;   /* current time (ns) (ro) */
	     long maxerror;	     /* maximum error (us) (ro) */
	     long esterror;	     /* estimated error (us) (ro) */
	     long tai;		     /* TAI offset */
	     int time_state;	     /* time status */
     };

     These are understood as:

     time	 Current time (read-only).

     maxerror	 Maximum error in microseconds (read-only).

     esterror	 Estimated error in microseconds (read-only).

     tai	 Temps Atomique International (French for International Atomic
		 Time), measures real time.  Used for acute time measurements.

     time_state	 Current time status.

RETURN VALUES
     The ntp_gettime() function returns the value 0 if successful; otherwise
     the value -1 is returned and the global variable errno is set to indicate
     the error.

     Possible states of the clock are:

     TIME_OK	 Everything okay, no leap second warning.
     TIME_INS	 Insert leap second warning.
     TIME_DEL	 Delete leap second warning.
     TIME_OOP	 Leap second in progress.
     TIME_WAIT	 Leap second has occurred.
     TIME_ERROR	 Clock not synchronized.

SEE ALSO
     ntp_adjtime(2), ntpd(8)

AUTHORS
     This manual page was written by Tom Rhodes ⟨trhodes@FreeBSD.org⟩.

BSD				 April 1, 2003				   BSD
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net