Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/t/timerinfo.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/t/timerinfo.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/t/timerinfo.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/t/timerinfo.html on line 8

TimerInfo(), TimerInfo_r()

Get information about a timer

Synopsis:

#include <sys/neutrino.h>

int TimerInfo( pid_t pid,
               timer_t id,
               int flags,
               struct _timer_info* info );

int TimerInfo_r( pid_t pid,
                 timer_t id,
                 int flags,
                 struct _timer_info* info );

Arguments:

pid
The process ID that you're requesting the timer information for.
id
The ID of the timer, as returned by TimerCreate().
flags
Supported flags are:
info
A pointer to a _timer_info structure where the function can store the information about the specified timer. For more details, see struct _timer_info,” below.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

These kernel calls get information about a previously created timer specified by id, and stores the information in the buffer pointed to by info.

The TimerInfo() and TimerInfo_r() functions are identical except in the way they indicate errors. See the Returns section for details.


Note: Instead of using these kernel calls directly, consider calling timer_getexpstatus(), timer_getoverrun(), or timer_gettime().

struct _timer_info

The _timer_info structure pointed to by info contains at least these members:

uint32_t flags
One or more of these bit flags:
_NTO_TI_ACTIVE
The timer is active.
_NTO_TI_ABSOLUTE
The timer is waiting for an absolute time to occur; otherwise, the timer is relative.
_NTO_TI_EXPIRED
The timer has expired.
int32_t tid
The thread to which the timer is directed (0 if it's directed to the process).
int32_t notify
The notify type.
clockid_t clockid
The type of clock used.
uint32_t overruns
The number of overruns.
struct sigevent event
The event dispatched when the timer expires.
struct itimerspec itime
Time when the timer was started.
struct itimerspec otime
Time remaining before the timer expires.

For more information, see the description of TimerCreate().

Blocking states

These calls don't block.

Returns:

The only difference between these functions is the way they indicate errors:

TimerInfo()
The ID of the timer that the information is for. If an error occurs, -1 is returned and errno is set.
TimerInfo_r()
The ID of the timer that the information is for. This function does NOT set errno. If an error occurs, the negative of a value from the Errors section is returned.

Errors:

EINVAL
The timer specified by id doesn't exist.
ESRCH
The process specified by pid doesn't exist.

Classification:

QNX Neutrino

Safety:
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

sigevent, timer_getexpstatus(), timer_getoverrun(), timer_gettime(), TimerCreate()

Clocks, Timers, and Getting a Kick Every So Often chapter of Getting Started with QNX Neutrino

Tick, Tock: Understanding the Neutrino Microkernel's Concept of Time chapter of the QNX Neutrino Programmer's Guide


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/t/timerinfo.html on line 292

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/t/timerinfo.html on line 292