From 195d6cded05f7ef5bde695ee047b341a0265eab3 Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Sun, 24 Mar 2013 00:03:37 +0100 Subject: 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 --- test/envs/opengl/model_test.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'test/envs/opengl/model_test.cpp') diff --git a/test/envs/opengl/model_test.cpp b/test/envs/opengl/model_test.cpp index 168eb32..1dda69c 100644 --- a/test/envs/opengl/model_test.cpp +++ b/test/envs/opengl/model_test.cpp @@ -153,9 +153,9 @@ void Update() const float ROT_SPEED = 80.0f * Math::DEG_TO_RAD; // rad / sec const float TRANS_SPEED = 3.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); if (KEYMAP[K_RotYLeft]) ROTATION.y -= ROT_SPEED * timeDiff; @@ -265,11 +265,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); if (argc != 3) { @@ -377,8 +377,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; } -- cgit v1.2.3-1-g7c22