GETUTIM(2)
NAME
getutim − obtain current universal time in seconds past the epoch
SYNOPSIS
int getutim(timvar)
long ∗timvar;
DESCRIPTION
Getutim obtains the current time measured in seconds past the epoch date, and places it in the longword pointed to by argument timvar. The correct time is usually kept by the real-time clock, but gettime may contact a time server on the network if the local time has not been initialized.
The epoch is taken to be zero seconds past Jan 1, 1970. Universal time, formerly called Greenwich Mean Time, is the mean solar time of the meridian in Greenwich, England, and is used throughout the world as a standard for measuring time.
If getutim cannot obtain the current time, it returns SYSERR to the caller. Otherwise, getutim returns OK.
SEE ALSO
BUGS
The local clock may drift, especially under heavy CPU activity or activities that require the operating system to mask interrupts for extended periods.
December 01, 1986 — Xinu Programmer’s Manual