This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Defines | |
#define | ZTIMER(function) |
A quick macro for measuring the execution time of function calls. | |
Functions | |
void | ZTimer_Start () |
Start the ZTimer. | |
int | ZTimer_Stop () |
Stop the ZTimer. | |
void | ZTimer_Report () |
Show measured time interval. |
|
Value: ZTimer_Start(), \ function, \ ZTimer_Stop(), \ printf(#function": "), \ ZTimer_Report() This safes some typing, and automatically generates easy-to-read output. example: ZTIMER( LCD_Update() ); output: LCD_Update(): 411us |
|
Show measured time interval. This function prints out the measured time in microseconds. Calling overhead for ZTimer_On and ZTimer_Off is taken into account. (usually 4-5 us on an @chipSC12)
Definition at line 85 of file ztimer.cpp. References last_t2cnt, ZTimer_Start(), and ZTimer_Stop(). |
|
Start the ZTimer. This function is to be called just before the piece of code you want to measure. This function uses Timer 2, which is otherwise used by the SC12 Bios. So better don't call any of the BIOS functions, because it could confuse it big time. All interrupts (except NMI) are disabled until a call to ZTimer_Off.
Definition at line 44 of file ztimer.cpp. References isActive, old_t2cmpa, old_t2con, PCB_T2CMPA, PCB_T2CNT, PCB_T2CON, TCON_START, and TCON_STOP. Referenced by gfxTest(), and ZTimer_Report(). |
|
Stop the ZTimer. This function has to be called right after the piece of code to measure. Timer 2 is given back to the BIOS, and interrupts are re-enabled. call ZTimer_Report() to show the measured time.
Definition at line 66 of file ztimer.cpp. References isActive, last_t2cnt, old_t2cmpa, old_t2con, PCB_T2CMPA, PCB_T2CNT, PCB_T2CON, and TCON_START. Referenced by gfxTest(), and ZTimer_Report(). |