summaryrefslogtreecommitdiffstats
path: root/test/envs/opengl/transform_test.cpp
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2013-03-24 00:03:37 +0100
committerPiotr Dziwinski <piotrdz@gmail.com>2013-03-24 12:00:12 +0100
commit195d6cded05f7ef5bde695ee047b341a0265eab3 (patch)
treeaf6ffa3622ae9bf7f2f5f065e269e86a019af854 /test/envs/opengl/transform_test.cpp
parentc211b001d2a4c9b36034a812650f1a2ac693ee54 (diff)
downloadcolobot-195d6cded05f7ef5bde695ee047b341a0265eab3.tar.gz
colobot-195d6cded05f7ef5bde695ee047b341a0265eab3.tar.bz2
colobot-195d6cded05f7ef5bde695ee047b341a0265eab3.zip
Fixed timer functions on win32
* changed win32 implementation to QueryPerformaceTimer system function * refactored system utils code * proper tests for time utils and update event creation in application * should fix issue #134
Diffstat (limited to 'test/envs/opengl/transform_test.cpp')
-rw-r--r--test/envs/opengl/transform_test.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/envs/opengl/transform_test.cpp b/test/envs/opengl/transform_test.cpp
index 02f9d83..1d5ccf1 100644
--- a/test/envs/opengl/transform_test.cpp
+++ b/test/envs/opengl/transform_test.cpp
@@ -138,9 +138,9 @@ void Update()
{
const float TRANS_SPEED = 6.0f; // units / sec
- GetCurrentTimeStamp(CURR_TIME);
- float timeDiff = TimeStampDiff(PREV_TIME, CURR_TIME, STU_SEC);
- CopyTimeStamp(PREV_TIME, CURR_TIME);
+ GetSystemUtils()->GetCurrentTimeStamp(CURR_TIME);
+ float timeDiff = GetSystemUtils()->TimeStampDiff(PREV_TIME, CURR_TIME, STU_SEC);
+ GetSystemUtils()->CopyTimeStamp(PREV_TIME, CURR_TIME);
Math::Vector incTrans;
@@ -243,11 +243,11 @@ int SDL_MAIN_FUNC(int argc, char *argv[])
{
CLogger logger;
- PREV_TIME = CreateTimeStamp();
- CURR_TIME = CreateTimeStamp();
+ PREV_TIME = GetSystemUtils()->CreateTimeStamp();
+ CURR_TIME = GetSystemUtils()->CreateTimeStamp();
- GetCurrentTimeStamp(PREV_TIME);
- GetCurrentTimeStamp(CURR_TIME);
+ GetSystemUtils()->GetCurrentTimeStamp(PREV_TIME);
+ GetSystemUtils()->GetCurrentTimeStamp(CURR_TIME);
// Without any error checking, for simplicity
@@ -337,8 +337,8 @@ int SDL_MAIN_FUNC(int argc, char *argv[])
SDL_Quit();
- DestroyTimeStamp(PREV_TIME);
- DestroyTimeStamp(CURR_TIME);
+ GetSystemUtils()->DestroyTimeStamp(PREV_TIME);
+ GetSystemUtils()->DestroyTimeStamp(CURR_TIME);
return 0;
}