46 lines
1.4 KiB
Plaintext
46 lines
1.4 KiB
Plaintext
'\"macro stdmacro
|
|
.Op c p a
|
|
.TH timer_gettime 3C
|
|
.SH NAME
|
|
\f4timer_gettime\f1 \- get the time remaining before posix timer expiration
|
|
.SH SYNOPSIS
|
|
.nf
|
|
\f4#include <time.h>\f1
|
|
.sp .6v
|
|
\f4int timer_gettime (timer_t \f2timerid\fP, struct itimerspec *\f2value\fP);\f1
|
|
.fi
|
|
.SH DESCRIPTION
|
|
.P
|
|
\f4timer_gettime\f1 retrieves the time remaining before the posix timer
|
|
named by \f2timerid\fP expires, as well as, the periodic timer interval
|
|
between expirations and stores the information at memory address \f2value\fP.
|
|
.P
|
|
The \f4it_value\fP field of \f2value\fP contains the time remainder, while the
|
|
\f4it_interval\fP field contains the periodic timer interval. If \f4it_value\fP
|
|
contains zero after a successful return, then the timer is disarmed.
|
|
If \f4it_interval\fP contains zero after a successful return, then the timer
|
|
is not periodic.
|
|
.P
|
|
\f4timer_gettime\f1 will fail if one or more of the following are true:
|
|
.TP 12
|
|
[EINVAL]
|
|
The \f2timerid\fP does not name a valid posix timer.
|
|
.TP
|
|
[EFAULT]
|
|
The address specified by \f2value\fP is outside the range of the address
|
|
space of the calling process.
|
|
.SH SEE ALSO
|
|
timer_create(3C),
|
|
timer_delete(3C),
|
|
timer_getoverrun(3C),
|
|
timer_settime(3C),
|
|
clock_settime(2),
|
|
clock_gettime(2),
|
|
clock_getres(2),
|
|
getitimer(2),
|
|
setiitimer(2)
|
|
.SH DIAGNOSTICS
|
|
Upon successful completion, a value of 0 is returned to the calling process.
|
|
Otherwise, a value of -1 is returned and \f4errno\fP is set to indicate
|
|
the error.
|