diff -r e5363cb96233 -r ae5d60bb70c9 mercurial/util.py --- 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: