This commit is contained in:
2024-09-28 22:51:35 -07:00
parent 7e1c6020ba
commit 5cdaf1f76b
5910 changed files with 933303 additions and 5 deletions

View File

@@ -0,0 +1,22 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See LICENSE in the project root
# for license information.
"""Provides monotonic timestamps with a resetable zero.
"""
import time
__all__ = ["current", "reset"]
def current():
return time.monotonic() - timestamp_zero
def reset():
global timestamp_zero
timestamp_zero = time.monotonic()
reset()