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.

_TICKSIZE_EXTERNAL
Disable Proc's use of the hardware clock. If this flag is set, an external clock source must be provided. This external clock has to generate an INT F5 at the nsec interval.

This flag allows the timer functions to be an even multiple of the external clock (rather than the default hardware timer).

Returns:

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

Errors:

EPERM
Operation not permitted. You must be root.

See also:

errno, qnx_adj_time()

Classification:

QNX

Systems:

QNX