first commit

This commit is contained in:
Ayxan
2022-05-23 00:16:32 +04:00
commit d660f2a4ca
24786 changed files with 4428337 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See LICENSE in the project root
# for license information.
from __future__ import absolute_import, division, print_function, unicode_literals
"""Provides monotonic timestamps with a resetable zero.
"""
import sys
import time
__all__ = ["current", "reset"]
if sys.version_info >= (3, 5):
clock = time.monotonic
else:
clock = time.clock
def current():
return clock() - timestamp_zero
def reset():
global timestamp_zero
timestamp_zero = clock()
reset()