*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: setclock | Section: 3 | Source: Digital UNIX | File: setclock.3.gz
setclock(3) Library Functions Manual setclock(3) NAME setclock - Sets value of system-wide clock LIBRARY Standard C Library (libc.a) SYNOPSIS #include <sys/timers.h> int setclock( int clktyp, struct timespec *val) ; PARAMETERS Specifies a system-wide clock whose symbolic name must be TIMEOFDAY. Points to the location where the value of the time to set into the clock specified by the clktyp parameter is stored. DESCRIPTION The setclock() function sets a time value into the system-wide clock whose symbolic name is specified by the clktyp parameter, which must be TIMEOFDAY, defined in the sys/timers.h header file. The source of the current value of time set into the system-wide time- of-day clock by this function is stored in space reserved by a type timespec structure pointed to by the val parameter. This time informa- tion is the amount of time since the epoch. The epoch is referenced to 00:00:00 GMT (Greenwich Mean Time) 1 Jan 1970. The timespec structure, which is also defined in the sys/timers.h header file has the following members: tab(@); r r lw(3.70i). unsigned long@tv_sec@Time of day since the epoch in seconds. long@tv_nsec@T{ Time of day fraction of a second (expressed in nanoseconds). T} NOTES Trial use RETURN VALUES Upon successful completion, the setclock() function returns a value of 0 (zero). Otherwise, a value of -1 is returned and errno is set to in- dicate the error. ERRORS If the setclock() function fails, errno may be set to one of the fol- lowing values: The clktyp parameter does not specify a known system- wide clock, the information pointed to by the val parameter is outside the permissible range for the clock specified by the clktyp parameter, or a nanosecond value less than zero or greater than or equal to 1000 million is specified by the information pointed to by the val parame- ter. An error occurred while accessing the clock specified by the clk- typ parameter. The requesting process does not have the appropriate privilege to set the clock specified by the clktyp parameter. RELATED INFORMATION Functions: getclock(3), gettimer(3), time(3) delim off setclock(3)

Navigation Options