shorter delay on timer test

This commit is contained in:
James Turk 2011-05-13 00:47:49 -04:00
parent fe471e087f
commit ca4d04c207

View File

@ -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()