mercurial/util.py
changeset 30974 ae5d60bb70c9
parent 30925 82f1ef8b4477
child 30975 22fbca1d11ed
--- a/mercurial/util.py	Thu Dec 22 02:38:53 2016 +0100
+++ b/mercurial/util.py	Wed Feb 15 11:53:59 2017 -0800
@@ -1203,8 +1203,13 @@
 
 if pycompat.osname == 'nt':
     checkosfilename = checkwinfilename
+    timer = time.clock
 else:
     checkosfilename = platform.checkosfilename
+    timer = time.time
+
+if safehasattr(time, "perf_counter"):
+    timer = time.perf_counter
 
 def makelock(info, pathname):
     try: