Multi-functional Stopwatch for Python
Project description
pystopwatch
Multi-functional Simple Stopwatch for Python.
- Multiple Stopwatch by Tags
- Manage elapsed times by tags
- Example of use : profiling python codes(latency by functions, ...)
Install
$ pip install pystopwatch2
Usage
from pystopwatch2 import PyStopwatch
w = PyStopwatch()
w.start(tag='a')
time.sleep(1)
w.pause('a')
e = w.get_elapsed('a')
print(e)
# 1.0xxx
w.start(tag='b')
time.sleep(0.5)
w.pause('b')
print(w)
"""
a: state=ClockState.PAUSE elapsed=1.0027 prev_time=1548382910.66398311
b: state=ClockState.PAUSE elapsed=0.5051 prev_time=1548382911.66670585
"""
e.clear('a')
e.clear('b')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pystopwatch2-0.1.1.tar.gz
(2.2 kB
view hashes)
Built Distribution
Close
Hashes for pystopwatch2-0.1.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b434da0b4657015fae5edf4e492504ec53019634f08d8b4f5706cd7c08879ab |
|
MD5 | 3310c49eae9a47f0c96104fcce2b7fe4 |
|
BLAKE2b-256 | 4a0a96f24578bbfdb2d3c7d9433414713dd1c90396c20e704fae10c8a69e39c6 |