HEX
Server: Apache/2.4.46 (Win64) OpenSSL/1.1.1j PHP/8.4.25
System: Windows NT DESKTOP-4TAV2RJ 10.0 build 19045 (Windows 10) AMD64
User: fred (0)
PHP: 8.4.25
Disabled: NONE
Upload Files
File: C:/Python311/Lib/site-packages/debugpy/common/timestamp.py
# 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()