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