Unix/Linux Go Back    

OpenSolaris 2009.06 - man page for ntp_gettime (opensolaris section 2)

Linux & Unix Commands - Search Man Pages
Man Page or Keyword Search:   man
Select Man Page Set:       apropos Keyword Search (sections above)

ntp_gettime(2)				   System Calls 			   ntp_gettime(2)

       ntp_gettime - get local clock values

       #include <sys/timex.h>

       int ntp_gettime(struct ntptimeval *tptr);

       The  ntp_gettime()  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) */
	     int32_t	      maxerror;   /* maximum error (us) (ro) */
	     int32_t	      esterror;   /* estimated error (us) (ro) */

       Upon  successful  completion,  ntp_gettime()  returns  the  current   clock   state   (see
       <sys/timex.h>). Otherwise, it returns -1 and sets errno to indicate the error.

       The ntp_gettime() function will fail if:

       EFAULT	 The tptr argument points to an invalid address.

       The ntp_gettime() function will fail for 32-bit interfaces if:

       EOVERFLOW    The  size of the time.tv_sec member of the ntptimeval structure pointed to by
		    tptr is too small to contain the correct number of seconds.

       xntpd(1M), ntp_adjtime(2)

SunOS 5.11				    9 Nov 1999				   ntp_gettime(2)
Unix & Linux Commands & Man Pages : ©2000 - 2018 Unix and Linux Forums

All times are GMT -4. The time now is 02:11 AM.