diff options
Diffstat (limited to 'build/tools/HLSLcc/May_2014/offline/timer.h')
| -rw-r--r-- | build/tools/HLSLcc/May_2014/offline/timer.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/build/tools/HLSLcc/May_2014/offline/timer.h b/build/tools/HLSLcc/May_2014/offline/timer.h new file mode 100644 index 0000000..05d6b0f --- /dev/null +++ b/build/tools/HLSLcc/May_2014/offline/timer.h @@ -0,0 +1,26 @@ +#ifndef TIMER_H +#define TIMER_H + +#ifdef _WIN32 +#include <Windows.h> +#else +#include <sys/time.h> +#endif + +typedef struct +{ +#ifdef _WIN32 + LARGE_INTEGER frequency; + LARGE_INTEGER startCount; + LARGE_INTEGER endCount; +#else + struct timeval startCount; + struct timeval endCount; +#endif +} Timer_t; + +void InitTimer(Timer_t* psTimer); +void ResetTimer(Timer_t* psTimer); +double ReadTimer(Timer_t* psTimer); + +#endif |