summaryrefslogtreecommitdiffstats
path: root/include/timings.h
blob: 6656867bc9d3bb85c66b66ea70ed7971562a3d46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef ROFI_TIMINGS_H
#define ROFI_TIMINGS_H
#include <config.h>

/**
 * @defgroup TIMINGS Timings
 * @ingroup HELPERS
 * @{
 */
#if TIMINGS

void rofi_timings_init ( void );
void rofi_timings_tick ( char const *str, int line, char const *msg );
void rofi_timings_quit ( void );

#define TIMINGS_START()    rofi_timings_init ()
#define TICK()             rofi_timings_tick ( __func__, __LINE__, "" )
#define TICK_N( a )        rofi_timings_tick ( __func__, __LINE__, a )
#define TIMINGS_STOP()     rofi_timings_quit ()

#else

#define TIMINGS_START()
#define TIMINGS_STOP()
#define TICK()
#define TICK_N( a )

#endif // TIMINGS
/*@}*/
#endif // ROFI_TIMINGS_H