STINNER Victor <vstin...@python.org> added the comment:
perf_counter documentation says "It does include time elapsed during sleep and is system-wide." where "sleep" here means time.sleep(): https://docs.python.org/dev/library/time.html#time.perf_counter Python clock functions don't provide any warranty regarding to system suspend or system hibernation. See PEP 418 for more details: "The behaviour of clocks after a system suspend is not defined in the documentation of new functions. The behaviour depends on the operating system: see the Monotonic Clocks section below." https://www.python.org/dev/peps/pep-0418/#monotonic-clocks I don't think that using mach_continuous_time() is needed, but the documentation should be clarified. The doc should explain that the behavior during system suspend is not defined (platform specific). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41303> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com