gettimer(3) — Subroutines
NAME
gettimer − Gets date and time
LIBRARY
Standard C Library (libc.a)
SYNOPSIS
#include <sys/timers.h>
int gettimer(
timer_t timerid,
struct itimerspec ∗tp) ;
PARAMETERS
timeridSpecifies the timer to get the current time from; only time TIMEOFDAY is supported.
tpPoints to a itimerspec structure.
DESCRIPTION
The gettimer() function gets the current value of a system time-of-day clock. The timerid parameter specifies the symbolic name that identifies the timer whose time is being monitored. Only one symbolic name may be specified: TIMEOFDAY, which returns the CUT (Coordinated Universal Time) time and date. The tp parameter points to a type itimerspec structure, which has members that specify the elapsed time and date in nanoseconds from 00:00:00 UCT, January 1, 1970. The tp structure is defined in the sys/time.h include file.
Actual resolution of a timer is determined by the basic system hardware clock period, which is 1/HZ. The restimer function returns the resolution for any particular system.
NOTES
AES Support Level:
Trial use
RETURN VALUES
Upon successful completion, the gettimer() function returns the value 0 (zero). Otherwise, a value of -1 is returned and errno is set to indicate the error.
ERRORS
If the gettimer() function fails, errno may be set to the following value:
[EINVAL]The timerid parameter does not specify a known timer.
RELATED INFORMATION
Functions: gettimeofday(2), getitimer(2)