]> git.proxmox.com Git - libgit2.git/blob - tests/perf/helper__perf__timer.h
New upstream version 1.4.3+dfsg.1
[libgit2.git] / tests / perf / helper__perf__timer.h
1 #if defined(GIT_WIN32)
2
3 struct perf__timer
4 {
5 LARGE_INTEGER sum;
6 LARGE_INTEGER time_started;
7 };
8
9 #define PERF_TIMER_INIT {0}
10
11 #else
12
13 struct perf__timer
14 {
15 uint32_t sum;
16 uint32_t time_started;
17 };
18
19 #define PERF_TIMER_INIT {0}
20
21 #endif
22
23 typedef struct perf__timer perf_timer;
24
25 void perf__timer__start(perf_timer *t);
26 void perf__timer__stop(perf_timer *t);
27 void perf__timer__report(perf_timer *t, const char *fmt, ...);