Get or set the default timer tolerance for a process
#include <sys/procmgr.h> int procmgr_timer_tolerance( const pid_t pid, const uint64_t * const ntime, uint64_t *otime );
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
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 has neither a specific tolerance nor 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 PROCMGR_AID_DEFAULT_TIMER_TOLERANCE ability enabled. For more information, see procmgr_ability().
The default timer tolerance is inherited across a fork(), but not an exec*() or a spawn*().
0 on success, or -1 if an error occurred (errno is set).
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |