Xinu7/man/man2/gettime.doc




GETTIME(2)          Xinu Programmer's Manual           GETTIME(2)



NAME
     gettime - obtain the current local time in seconds past the
     epoch date

SYNOPSIS
     int gettime(timvar)
     long *timvar;

DESCRIPTION
     _G_e_t_t_i_m_e obtains the local time measured in seconds past the
     epoch date, and places it in the longword pointed to by
     argument _t_i_m_v_a_r.  The epoch is taken to be zero seconds past
     Jan 1, 1970.

     The correct time is usually kept by the real-time clock, but
     _g_e_t_t_i_m_e  may contact a time server on the network if the
     local time has not been initialized.

     If _g_e_t_t_i_m_e cannot obtain the current time, it returns SYSERR
     to the caller.  Otherwise, _g_e_t_t_i_m_e returns OK.

SEE ALSO
     getutim(2)

BUGS
     Local time computation does not take daylight savings into
     account.  The local clock may drift, especially under heavy
     CPU activity or activities that require the operating system
     to mask interrupts for extended periods.


























Version 6b               Printed 1/12/87                        1