getitimer()

get value of interval timer 

Function


SYNOPSIS

#include <sys/time.h>

int getitimer (int which, struct itimerval *value);


DESCRIPTION

The system provides each process with an interval timers. When the timer expires, a signal is sent to the process, and the timer (potentially) restarts.

The getitimer() function stores the current value of the timer specified by which into the structure pointed to by value.


PARAMETERS

which 

Is the timer value to get. Must be ITIMER_REAL.

value 

Points to a itimerval structure to hold timer value.


RETURN VALUES

On success, zero is returned. On error, -1 is returned, and errno is set as follows:

EFAULT 

value is not a valid pointer

EINVAL 

which is not one of ITIMER_REAL, ITIMER_VIRTUAL, or ITIMER_PROF

ENOSYS 

which is ITIMER_VIRTUAL or ITIMER_PROF


CONFORMANCE

UNIX 98, with exceptions.


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

The NuTCRACKER Platform supports the semantics of ITIMER_REAL, but not ITIMER_VIRTUAL or ITIMER_PROF. Calls using either of these unsupported timers return -1 and set errno to ENOSYS.

On 8.1/2012R2/10/2016/2019/11/2022, waitable timers with 100-nanosecond resolution are available, so getitimer() has microsecond accuracy.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
alarm(), gettimeofday(), setitimer(), sigaction(), signal()


PTC MKS Toolkit 10.4 Documentation Build 39.