#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_Start(),          \
        function,                \
        ZTimer_Stop(),           \
        printf(#function": "),   \
        ZTimer_Report()

extern void ZTimer_Start();
extern int  ZTimer_Stop();
extern void ZTimer_Report();

#endif
