|
Internal Timer <timer.h> |
Top Previous Next |
|
The C6000 has two internal timers: Timer 0 is controlled by the microkernel while timer 1 is available for user programs.
User programs cannot access timer 0 directly, but instead use the <timer.h> functions which work from an internal clock maintained by the microkernel. The timer currently ticks 1000 times a second, and so has a resolution of 1msec. Note that this applies to threads of all priorities. It is possible that this rate of ticking may be changed in future releases of Diamond. Rather than assume a rate of 1000 ticks a second you should use the value returned by the library function timer_rate; this always returns the correct rate.
If your module’s processor clock does not tick at the rate defined in the standard processor type for that module, you can change the rate using the CLOCK attribute of the configurer’s PROCESSOR statement. The CLOCK attribute can also be used to prevent the kernel from using TIMER 0.
|