#include "stopwatch.h"
Go to the source code of this file.
Defines | |
#define | _TIFA_TIMER_H_ |
#define | TIMING_FORMAT "%8.3f" |
#define | INIT_NAMED_TIMER(NAME) |
#define | RESET_NAMED_TIMER(NAME) |
#define | START_NAMED_TIMER(NAME) |
#define | STOP_NAMED_TIMER(NAME) |
#define | GET_NAMED_TIMING(NAME) get_stopwatch_elapsed(&__TIFA_STOPWATCH_ ##NAME) |
#define | INIT_TIMER INIT_NAMED_TIMER() |
#define | RESET_TIMER RESET_NAMED_TIMER() |
#define | START_TIMER START_NAMED_TIMER() |
#define | STOP_TIMER STOP_NAMED_TIMER() |
#define | GET_TIMING GET_NAMED_TIMING() |
__TIMING__
symbol should be defined in the file including this header. It is under the responsability of the including file to check for its definition or to define it, if needed.__TIMING__
is set to 0, then the macros defined in this file do nothing.
Definition in file timer.h.
#define GET_NAMED_TIMING | ( | NAME | ) | get_stopwatch_elapsed(&__TIFA_STOPWATCH_ ##NAME) |
#define GET_TIMING GET_NAMED_TIMING() |
#define INIT_NAMED_TIMER | ( | NAME | ) |
Value:
stopwatch_t __TIFA_STOPWATCH_ ##NAME; \ init_stopwatch(&__TIFA_STOPWATCH_ ##NAME);
INIT_NAMED_TIMER(my_timer)
is correct, but INIT_NAMED_TIMER("my_timer")
is wrong and will result in a compilation error.*_NAMED_TIMER
macros.
#define INIT_TIMER INIT_NAMED_TIMER() |
#define RESET_NAMED_TIMER | ( | NAME | ) |
Value:
do { \ reset_stopwatch(&__TIFA_STOPWATCH_ ##NAME); \ } while (0)
#define RESET_TIMER RESET_NAMED_TIMER() |
#define START_NAMED_TIMER | ( | NAME | ) |
Value:
do { \ start_stopwatch(&__TIFA_STOPWATCH_ ##NAME); \ } while (0)
#define START_TIMER START_NAMED_TIMER() |
#define STOP_NAMED_TIMER | ( | NAME | ) |
Value:
do { \ stop_stopwatch(&__TIFA_STOPWATCH_ ##NAME); \ } while (0)
#define TIMING_FORMAT "%8.3f" |