CLK_countspms
2-48
C Interface
Syntax
ncounts = CLK_countspms();
Parameters
Void
Return Value
LgUns
ncounts;
Reentrant
yes
Description
CLK_countspms returns the number of high-resolution timer counts per
millisecond.
CLK_countspms can be used to compute an absolute length of time from
the number of low resolution timer interrupts. For example, the following
code computes time in milliseconds.
timeAbs = (CLK_getltime() * CLK_getprd()) / CLK_countspms();
The equation below computes time in milliseconds since the last wrap of
the high-resolution timer counter.
timeAbs = CLK_gethtime() / CLK_countspms();
See Also
CLK_gethtime
CLK_getprd
CLK_cpuCyclesPerHtime
CLK_cpuCyclesPerLtime
GBL_getClkin
STS_delta
CLK_countspms
Number of hardware timer counts per millisecond