aboutsummaryrefslogtreecommitdiff
path: root/build/tools/HLSLcc/May_2014/offline/timer.cpp
diff options
context:
space:
mode:
authorlbavoil <[email protected]>2018-03-15 11:19:29 +0100
committerlbavoil <[email protected]>2018-03-15 11:19:29 +0100
commitf01ecebfa72d6c470056b47e997dc7183fea1016 (patch)
tree6d1503a28e93c227046addb4d5d4fabaa33fc1aa /build/tools/HLSLcc/May_2014/offline/timer.cpp
parentHBAO+ 4.0.0.23740451 (diff)
downloadhbaoplus-f01ecebfa72d6c470056b47e997dc7183fea1016.tar.xz
hbaoplus-f01ecebfa72d6c470056b47e997dc7183fea1016.zip
HBAO+ 4.0.0.23740451
Diffstat (limited to 'build/tools/HLSLcc/May_2014/offline/timer.cpp')
-rw-r--r--build/tools/HLSLcc/May_2014/offline/timer.cpp37
1 files changed, 0 insertions, 37 deletions
diff --git a/build/tools/HLSLcc/May_2014/offline/timer.cpp b/build/tools/HLSLcc/May_2014/offline/timer.cpp
deleted file mode 100644
index ac7858b..0000000
--- a/build/tools/HLSLcc/May_2014/offline/timer.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-#include "timer.h"
-
-void InitTimer(Timer_t* psTimer)
-{
-#if defined(_WIN32)
- QueryPerformanceFrequency(&psTimer->frequency);
-#endif
-}
-
-void ResetTimer(Timer_t* psTimer)
-{
-#if defined(_WIN32)
- QueryPerformanceCounter(&psTimer->startCount);
-#else
- gettimeofday(&psTimer->startCount, 0);
-#endif
-}
-
-/* Returns time in micro seconds */
-double ReadTimer(Timer_t* psTimer)
-{
- double startTimeInMicroSec, endTimeInMicroSec;
-
-#if defined(_WIN32)
- const double freq = (1000000.0 / psTimer->frequency.QuadPart);
- QueryPerformanceCounter(&psTimer->endCount);
- startTimeInMicroSec = psTimer->startCount.QuadPart * freq;
- endTimeInMicroSec = psTimer->endCount.QuadPart * freq;
-#else
- gettimeofday(&psTimer->endCount, 0);
- startTimeInMicroSec = (psTimer->startCount.tv_sec * 1000000.0) + psTimer->startCount.tv_usec;
- endTimeInMicroSec = (psTimer->endCount.tv_sec * 1000000.0) + psTimer->endCount.tv_usec;
-#endif
-
- return endTimeInMicroSec - startTimeInMicroSec;
-}
-