BSP and Device Driver Development Guide
The Read_timer
routine
returns the number of benchmark time units (typically microseconds)
that have elapsed since the last call to Timer_initialize
.
int Read_timer(void) { stop time = read the hardware timer if the subtract overhead feature is enabled subtract overhead from stop time return the stop time }
Many implementations of this routine subtract the overhead required to initialize and read the benchmark timer. This makes the times reported more accurate.
Some implementations report 0 if the harware timer value change is sufficiently small. This is intended to indicate that the execution time is below the resolution of the timer.
BSP and Device Driver Development Guide
Copyright © 1988-2004 OAR Corporation