Permalink
Browse files

Fix the unit tests on windows

Ignores
  • Loading branch information...
1 parent c8d4eab commit 4d0c1f10fa8a33370c784c32a5531e3d67852749 @raffienficiaud raffienficiaud committed May 7, 2014
Showing with 4 additions and 1 deletion.
  1. +2 −0 .hgignore
  2. +2 −1 test_ch/test_performance.py
View
@@ -0,0 +1,2 @@
+syntax: glob
+*.pyc
@@ -38,10 +38,11 @@ def abstract_ressource_timer():
windll.Kernel32.QueryPerformanceCounter(byref(val))
return val
def abstract_ressource_counter(r1, r2):
+ """Returns the elapsed time between r2 and r1 (r2 > r1) in milliseconds"""
val = c_int64()
windll.Kernel32.QueryPerformanceFrequency(byref(val))
- return (1000*(r2.value-r1.value))/val.value
+ return (1000*float(r2.value-r1.value))/val.value
except ImportError:
has_win32api = False

0 comments on commit 4d0c1f1

Please sign in to comment.