# HG changeset patch # User Matt Harbison # Date 2019-12-31 04:53:53 # Node ID 6b90f5c89cb478b0d628c59a55f0cc2a28eedb79 # Parent 1e0783b946c89be5e87e1a4d95d6d67931b2a743 py3: replace `time.clock()` with `time.perf_counter()` The former was removed in 3.8. The util function uses `time.clock()` if the latter is unavailable. Differential Revision: https://phab.mercurial-scm.org/D7779 diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py --- a/mercurial/dispatch.py +++ b/mercurial/dispatch.py @@ -15,7 +15,6 @@ import pdb import re import signal import sys -import time import traceback @@ -1040,8 +1039,8 @@ def _dispatch(req): def get_times(): t = os.times() if t[4] == 0.0: - # Windows leaves this as zero, so use time.clock() - t = (t[0], t[1], t[2], t[3], time.clock()) + # Windows leaves this as zero, so use time.perf_counter() + t = (t[0], t[1], t[2], t[3], util.timer()) return t s = get_times()