Skip to content

Commit

Permalink
Fix the unit tests on windows
Browse files Browse the repository at this point in the history
Ignores
  • Loading branch information
raffienficiaud committed May 7, 2014
1 parent c8d4eab commit 4d0c1f1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .hgignore
@@ -0,0 +1,2 @@
syntax: glob
*.pyc
3 changes: 2 additions & 1 deletion test_ch/test_performance.py
Expand Up @@ -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
Expand Down

0 comments on commit 4d0c1f1

Please sign in to comment.