Manual Page Result
0
Command: gettimer | Section: 3 | Source: Digital UNIX | File: gettimer.3.gz
gettimer(3) Library Functions Manual gettimer(3)
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
Specifies the timer to get the current time from; only time TIMEOFDAY
is supported. Points 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 identi-
fies the timer whose time is being monitored. Only one symbolic name
may be specified: TIMEOFDAY, which returns the CUT (Coordinated Univer-
sal 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 resolu-
tion for any particular system.
NOTES
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 indi-
cate the error.
ERRORS
If the gettimer() function fails, errno may be set to the following
value: The timerid parameter does not specify a known timer.
RELATED INFORMATION
Functions: gettimeofday(2), getitimer(2) delim off
gettimer(3)