#ifndef ZTIMER_H
#define ZTIMER_H

/**
 * A quick macro for measuring the execution time
 * of function calls. This safes some typing, and
 * automatically generates easy-to-read output.
 *
 * example: ZTIMER( LCD_Update() );
 * output:  LCD_Update(): 411us
 *
 */
#define ZTIMER(function)         \
        ZTimer_On(),             \
        function,                \
        ZTimer_Off(),            \
        printf(#function": "),   \
        ZTimer_Report()

extern void ZTimer_On();
extern void ZTimer_Off();
extern void ZTimer_Report();

#endif
