*** 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: getclock | Section: 3 | Source: Digital UNIX | File: getclock.3.gz
getclock(3) Library Functions Manual getclock(3) NAME getclock - Gets current value of system-wide clock. LIBRARY Standard C Library (libc.a) SYNOPSIS #include <sys/timers.h> int getclock( int clktyp, struct timespec *tp) ; PARAMETERS Identifies a system-wide clock. Points to a timespec structure space where the current value of the system-wide clock is stored. DESCRIPTION The getclock() function sets the current value of the clock specified by clktyp into the location pointed to by the tp parameter. The clktyp parameter is given as a symbolic constant name, as defined in the sys/timers.h include file. Only the TIMEOFDAY symbolic con- stant, which specifies the normal time-of-day clock to access for sys- tem-wide time, is supported. For the clock specified by TIMEOFDAY, the value returned by this func- tion is the elapsed time since the epoch. The epoch is referenced to 00:00:00 CUT (Coordinated Universal Time) 1 Jan 1970. The getclock() function returns a timespec structure, which is defined in the sys/timers.h header file. It has the following members: tab(@); r l l. time_t@tv_sec@Elapsed time in seconds since the epoch long@tv_nsec@Elapsed time as a fraction of a second since @@the epoch (expressed in nanoseconds) The time interval expressed by the members of this structure is ((tv_sec * 10^9) + (tv_nsec)) nanoseconds. NOTES Trial use RETURN VALUES Upon successful completion, the getclock() function returns a value of 0 (zero). Otherwise, getclock() returns a value of -1 and sets errno to indicate the error. ERRORS If the getclock() function fails, errno is to one of the following val- ues: The clktyp parameter does not specify a known system-wide clock. An error occurred when the system-wide clock specified by the clktyp parameter was accessed. RELATED INFORMATION Functions: gettimeofday(2), gettimer(3), setclock(3), time(3) delim off getclock(3)

Navigation Options