CLK_cpuCyclesPerLtime
2-50
C Interface
Syntax
ncycles = CLK_cpuCyclesPerLtime(Void);
Parameters
Void
Return Value
Float
ncycles;
Reentrant
yes
Description
CLK_cpuCyclesPerLtime returns the multiplier required to convert from
low-resolution time to CPU cycles. Low-resolution time is returned by
CLK_gethtime.
For example, the following code returns the number of CPU cycles and
milliseconds elapsed during processing.
time1 = CLK_getltime();
... processing ...
time2 = CLK_getltime();
CPUcycles = (time2 - time1) * CLK_cpuCyclesPerLtime();
/* calculate absolute time in milliseconds */
TimeAbsolute = CPUCycles / GBL_getFrequency();
See Also
CLK_getltime
CLK_getprd
GBL_getClkin
CLK_cpuCyclesPerLtime
Return multiplier for converting low-res time to CPU cycles