Skip to content

Commit 0fc7081

Browse files
committed
Windows: replace time.clock with perf_counter for py3
author: frostming Origin PR: pallets-eco#638
2 parents 3ef0e1f + 8091cb7 commit 0fc7081

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

flask_sqlalchemy/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@
3636

3737
# the best timer function for the platform
3838
if sys.platform == 'win32':
39-
_timer = time.clock
39+
if sys.version_info >= (3, 3):
40+
_timer = time.perf_counter
41+
else:
42+
_timer = time.clock
4043
else:
4144
_timer = time.time
4245

0 commit comments

Comments
 (0)