Set the system timer granularity (QNX)
ticksize [-e] [size]
The ticksize utility queries or changes the rate at which timer interrupts (called ticks) are applied to the system. The tick size determines the granularity of all software system timers. All time requests will be rounded up to this granularity. For example, if the tick size is 10 milliseconds, a request to wait for 1 millisecond may wait for up to 10 milliseconds.
Setting the tick size will not affect the system date, nor will it affect active software timers, other than the granularity of the point where they are triggered.
The timer ticksize is independent of the scheduling timeslice
rate at which competing READY processes are scheduled to run.
Note also that QNX uses a realtime preemptive scheduler. Therefore, if a process becomes READY (perhaps as the result of an external interrupt) and is the highest priority process, it will be scheduled immediately. There is no delay based upon the tick size. Ticks are used for software timers only, not for round-robin scheduling granularity. |
If your machine has a CPU speed rating of less than 600 as reported by:
sin info
then you cannot set your tick size below 1 millisecond.
When QNX boots, it sets the tick size to 10 milliseconds for machines with a CPU speed greater than or equal to 300. For machines with CPU speeds less than 300, the tick size is set to 50 milliseconds.
Query approximate current tick size:
ticksize
Query the current tick size, to the nearest nanosecond:
ticksize -e
Set the tick size to 50 milliseconds:
ticksize 50
Set the tick size to .5 milliseconds:
ticksize .5