From ca4d04c207172956625a0692a0ce3e97945c80e4 Mon Sep 17 00:00:00 2001 From: James Turk Date: Fri, 13 May 2011 00:47:49 -0400 Subject: [PATCH] shorter delay on timer test --- photon/tests/test_timer.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/photon/tests/test_timer.py b/photon/tests/test_timer.py index 3bd0c15..5439199 100644 --- a/photon/tests/test_timer.py +++ b/photon/tests/test_timer.py @@ -7,11 +7,12 @@ def init_timer(): def test_performance_counter(): init_timer() first = timer.get_performance_counter() - time.sleep(1.1) + time.sleep(0.1) second = timer.get_performance_counter() freq = timer.get_performance_frequency() assert second > first - assert second/freq > first/freq + # delay should safely put it in this range + assert 0.05 < second/float(freq) - first/float(freq) < 0.2 def test_get_ticks(): init_timer()