003 File Manager
Current Path:
/usr/local/lib/python3.8/site-packages/zmq/sugar
usr
/
local
/
lib
/
python3.8
/
site-packages
/
zmq
/
sugar
/
📁
..
📄
__init__.py
(725 B)
📄
__init__.pyi
(218 B)
📁
__pycache__
📄
attrsettr.py
(2.1 KB)
📄
constants.py
(2.6 KB)
📄
constants.pyi
(4.64 KB)
📄
context.py
(9.99 KB)
📄
frame.py
(3.42 KB)
📄
poll.py
(5.56 KB)
📄
socket.py
(28.15 KB)
📄
stopwatch.py
(943 B)
📄
tracker.py
(3.49 KB)
📄
version.py
(1.41 KB)
Editing: stopwatch.py
"""Deprecated Stopwatch implementation""" # Copyright (c) PyZMQ Development Team. # Distributed under the terms of the Modified BSD License. class Stopwatch(object): """Deprecated zmq.Stopwatch implementation You can use Python's builtin timers (time.monotonic, etc.). """ def __init__(self): import warnings warnings.warn( "zmq.Stopwatch is deprecated. Use stdlib time.monotonic and friends instead", DeprecationWarning, stacklevel=2, ) self._start = 0 import time try: self._monotonic = time.monotonic except AttributeError: self._monotonic = time.time def start(self): """Start the counter""" self._start = self._monotonic() def stop(self): """Return time since start in microseconds""" stop = self._monotonic() return int(1e6 * (stop - self._start))
Upload File
Create Folder