procmgr_timer_tolerance()

Get or set the default timer tolerance for a process

Synopsis:

#include <sys/procmgr.h>

int procmgr_timer_tolerance( const pid_t pid,
                             const uint64_t * const ntime,
                             uint64_t *otime );

Since:

BlackBerry 10.1.0

Arguments:

pid
The process ID of the process whose default timer tolerance you want to set, or 0 to set it for the calling process.
ntime
NULL, or the default timer tolerance, in nanoseconds. Specify a value of ~0ULL for infinite tolerance.
otime
NULL, or a pointer to a location where the function can store the current or previous timer tolerance.

Library:

libc

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

Description:

The procmgr_timer_tolerance() function sets or gets the default timer tolerance for a process. This tolerance is used when calculating timer tolerance if the timer doesn't already have a tolerance set, or has the TIMER_PRECISE flag set. This includes the implicit timer used for TimerTimeout() operations.

In order to set the default tolerance of another process, the calling process must have the same user ID, be root, or possess the PROCMGR_AID_DEFAULT_TIMER_TOLERANCE ability. For more information, see procmgr_ability().

The default timer tolerance is inherited across a fork(), but not an exec*() or a spawn*().

Returns:

0 on success, or -1 if an error occurred ( errno is set).

Errors:

EPERM
Insufficient permission.
ESRCH
There's no process with the specified process ID.

Classification:

QNX Neutrino

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

Last modified: 2014-06-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus