Skip to content
Snippets Groups Projects
Commit a54188cb authored by callum_linden's avatar callum_linden
Browse files

Investigative check-in to see if system clock() function can be used to time...

Investigative check-in to see if system clock() function can be used to time ms_sleep() calls and adjust expectations accordingly
parent 9635923d
No related branches found
No related tags found
Loading
...@@ -83,7 +83,13 @@ namespace tut ...@@ -83,7 +83,13 @@ namespace tut
} }
template<> template<> template<> template<>
void frametimer_object_t::test<3>() void frametimer_object_t::test<3>()
{ {
clock_t t1 = clock();
ms_sleep(200);
clock_t t2 = clock();
clock_t elapsed = t2 - t1 + 1;
std::cout << "Note: using clock(), ms_sleep() actually took " << (long)elapsed << "ms" << std::endl;
F64 seconds_since_epoch = LLFrameTimer::getTotalSeconds(); F64 seconds_since_epoch = LLFrameTimer::getTotalSeconds();
seconds_since_epoch += 2.0; seconds_since_epoch += 2.0;
LLFrameTimer timer; LLFrameTimer timer;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment