summaryrefslogtreecommitdiff
path: root/mako/compat.py
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2019-07-25 22:17:22 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2019-07-27 12:03:01 -0400
commit6535ec6b95d3b3978fe52ea31523c7bd14f4e95b (patch)
treeae0dc1ef5fae5cfdc299e4c78584d1264b750ab9 /mako/compat.py
parent74c6bdaf8c631ce9af957edb0ae6c96b17bca6e2 (diff)
downloadmako-6535ec6b95d3b3978fe52ea31523c7bd14f4e95b.tar.gz
use timeit.default_timer instead of time.clock() / time.time()
Replaced usage of time.clock() on windows as well as time.time() elsewhere for microsecond timestamps with timeit.default_timer(), as time.clock() is being removed in Python 3.8. Pull request courtesy Christoph Reiter. Fixes: #301 Closes: #302 Pull-request: https://github.com/sqlalchemy/mako/pull/302 Pull-request-sha: a706e952727337702692fd1d8369d259e1600d6e Change-Id: I24e2cd3d2c02323a6fa2b063e86cabe555df2036
Diffstat (limited to 'mako/compat.py')
-rw-r--r--mako/compat.py6
1 files changed, 0 insertions, 6 deletions
diff --git a/mako/compat.py b/mako/compat.py
index a3b1fd0..2444cad 100644
--- a/mako/compat.py
+++ b/mako/compat.py
@@ -6,7 +6,6 @@
import json # noqa
import sys
-import time
py3k = sys.version_info >= (3, 0)
py33 = sys.version_info >= (3, 3)
@@ -141,11 +140,6 @@ except ImportError:
else:
import dummy_thread as thread # noqa
-if win32 or jython:
- time_func = time.clock
-else:
- time_func = time.time
-
try:
from functools import partial
except: