diff mercurial/dispatch.py @ 30975:22fbca1d11ed

mercurial: switch to util.timer for all interval timings util.timer is now the best available interval timer, at the expense of not having a known epoch. Let's use it whenever the epoch is irrelevant.
author Simon Farnsworth <simonfar@fb.com>
date Wed, 15 Feb 2017 13:17:39 -0800
parents 6d642ecf1a89
children e92daf156d5c
line wrap: on
line diff
--- a/mercurial/dispatch.py	Wed Feb 15 11:53:59 2017 -0800
+++ b/mercurial/dispatch.py	Wed Feb 15 13:17:39 2017 -0800
@@ -123,7 +123,7 @@
         return -1
 
     msg = ' '.join(' ' in a and repr(a) or a for a in req.args)
-    starttime = time.time()
+    starttime = util.timer()
     ret = None
     try:
         ret = _runcatch(req)
@@ -135,7 +135,7 @@
                 raise
         ret = -1
     finally:
-        duration = time.time() - starttime
+        duration = util.timer() - starttime
         req.ui.flush()
         req.ui.log("commandfinish", "%s exited %s after %0.2f seconds\n",
                    msg, ret or 0, duration)