[Previous]
[Contents]
[Next]

qnx_ticksize()

set the system tick size

Synopsis:

#include <time.h>
long qnx_ticksize( long nsec,
                   int flags );

Description:

The qnx_ticksize() function sets the system tick size. This tick is the base granularity for the time functions.

The nsec argument specifies the ticksize in nanoseconds. The flags argument controls how the nsec value is used. At least the following exclusive flag values are defined:

_TICKSIZE_STANDARD
Round nsec to the nearest standard ticksize: (.5, 1, 2, 5, 10, 25, 50 or 55 milliseconds). See the ticksize utility.
_TICKSIZE_CLOSEST
Adjust the nsec value down to the nearest multiple of the hardware supported time base. On the PC, this is a multiple of 838.095345 ns.

This flag allows the timer functions to be an even multiple of the hardware timer.

Returns:

The previous ticksize (in nanoseconds) upon success. If an error occurs, -1 is returned and errno is set to indicate the error.

Errors:

EPERM
Operation not permitted. You must be root.

Classification:

QNX

Safety:
Interrupt handler No
Signal handler Yes, but modifies errno
Thread Yes

Caveats:

Your application must run as root to call this function.

See also:

errno, qnx_adj_time()


[Previous]
[Contents]
[Next]