From a54188cb3d215db94e0392cb33e7ef999963335a Mon Sep 17 00:00:00 2001 From: callum_linden Date: Mon, 22 Dec 2014 14:19:19 -0800 Subject: Investigative check-in to see if system clock() function can be used to time ms_sleep() calls and adjust expectations accordingly --- indra/llcommon/tests/llframetimer_test.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'indra/llcommon') diff --git a/indra/llcommon/tests/llframetimer_test.cpp b/indra/llcommon/tests/llframetimer_test.cpp index 46fc4ce93a..c36b6a1c42 100755 --- a/indra/llcommon/tests/llframetimer_test.cpp +++ b/indra/llcommon/tests/llframetimer_test.cpp @@ -83,7 +83,13 @@ namespace tut } template<> template<> 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(); seconds_since_epoch += 2.0; LLFrameTimer timer; -- cgit v1.2.3