Chapter Contents

Previous

Next
getitimer

getitimer



Obtain Interval Timer Values

Portability: UNIX compatible


SYNOPSIS
DESCRIPTION
RETURN VALUE
USAGE NOTES
RELATED FUNCTIONS


SYNOPSIS

#include <sys/time.h>
int getitimer(int kind, 
              struct itimerval *val);


DESCRIPTION

The getitimer function returns information about an active interval timer. (See setitimer for more information about interval timers.)

The kind argument is a symbolic constant that specifies the type of time interval for which information is wanted. The permitted values are:

ITIMER_REAL
Specifies a real time interval. Each time the interval expires, a SIGALRM signal is generated.

ITIMER_VIRTUAL
Specifies a virtual (CPU) time interval. Each time the interval expires, a SIGVTALRM signal is generated.

ITIMER_PROF
Specifies a profiling interval, measuring CPU time plus system time used in behalf of this process. Each time the interval expires, a SIGPROF signal is generated.

The val argument is a pointer to an itimerval structure in which information about the current interval timer should be stored. See setitimer for more information on the contents of a struct itimerval.


RETURN VALUE

getitimer returns 0 if successful, or -1 if unsuccessful.


USAGE NOTES

The getitimer function can only be used with MVS 5.2.2 or a later release.


RELATED FUNCTIONS

setitimer


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.