Merge branch 'master' of http://www-dev.cockos.com/wdl/WDL into updatewdl
[wdl/wdl-ol.git] / WDL / timing.h
blob7960bd4d002b8dee1e0b7fa4fa3dce144635417d
1 /*
2 WDL - timing.h
4 this is based on some public domain Pentium RDTSC timing code from usenet in 1996.
6 To enable this, your app must #define TIMING, include timing.h, call timingInit(), then timingEnter(x)/timingLeave(x) a bunch
7 of times (where x is 0-64), then timingPrint at the end.
9 on timingPrint(), C:\\timings.txt will be overwritten.
13 #ifndef _TIMING_H_
14 #define _TIMING_H_
17 //#define TIMING
21 #if defined(TIMING) && !defined(__alpha)
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 void _timingInit(void);
26 void _timingPrint(void);
27 void _timingEnter(int);
28 void _timingLeave(int);
29 #ifdef __cplusplus
31 #endif
32 #define timingPrint() _timingPrint()
33 #define timingInit() _timingInit()
34 #define timingLeave(x) _timingLeave(x)
35 #define timingEnter(x) _timingEnter(x)
36 #else
37 #define timingPrint()
38 #define timingInit()
39 #define timingLeave(x)
40 #define timingEnter(x)
41 #endif
43 #endif