HP-UX Reference (11i v1 00/12) - 3 Library Functions A-M (vol 6)
__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man3/!!!intro.3c
________________________________________________________________
___ ___
g
getclock(3C) getclock(3C)
NAME
getclock - get current value of system-wide clock
SYNOPSIS
#include <sys/timers.h>
int getclock(int clock_type, struct timespec *tp);
DESCRIPTION
The getclock() function gets the current value tp of the specified system-wide clock, clock_type .
getclock() supports a clock_type of TIMEOFDAY, defined in <sys/timers.h >, which
represents the time-of-day clock for the system. For this clock, the values returned by getclock()
represent the amount of time since the Epoch.
APPLICATION USAGE
getclock() is thread-safe and async-cancel-safe.
RETURN VALUE
Upon successful completion, getclock() returns a value of zero; otherwise it returns a value of −1 and
sets
errno to indicate the error.
ERRORS
getclock() fails if any of the following conditions are encountered:
[EINVAL] clock_type does not specify a known system-wide clock.
[EIO] An error occurred while accessing the clock device.
FILES
/usr/include/sys/timers.h
SEE ALSO
clock_gettime(2), gettimer(3C), setclock(3C).
STANDARDS CONFORMANCE
getclock(): AES
HP-UX Release 11i: December 2000 − 1 − Section 3−−287
___
___