CKR_1US 1 microsecond CKR_10US 10 microseconds CKR_100US 100 microseconds CKR_1MS 1 millisecond CKR_10MS 10 milliseconds CKR_ST1 Schmitt Trigger 1 CKR_LINE Line Time Clockckreset
ckstart and ckstop respectively start and stop the clock without affecting the other parameters.
ckpause waits dur clock intervals without having to start and stop the clock.
ckread latches the current value of the clock counter into a register and returns it in the address passed as time.
cknovf is the number of clock overflows since the last call to ckreset. It is important to know the overflow count when running the clock during events that last more than 65,535 clock intervals. (An alternative to keeping track of the overflows is to adjust the clock rate so that the event being timed lasts for less than 65,535 clock intervals).
_ckcs is macro that gives information such as rate, mode and whether the clock is running. For information about using and interpreting _ckcs see progrmbl_clk(4P) and your local systems person.
ckwait(CKR_1MS, 250);The following illustrates the use of ckreset and the clock macros:
unsigned time, otime;
ckreset(CKR_10MS); ckstart; . . . ckread(&time); otime = cknovf; . . . ckstop;