A precise stopwatch built on top of perf_counter.
Project description
stoppy ⏱
A precise stopwatch built on top of perf_counter
, which
The stopwatch can optionally be started automatically by calling time
instead of start
, which can streamline usage when polling the time repeatedly.
Installation
Install from PyPI via:
pip install stoppy
Usage
Basic usage is as follows:
from time import sleep
from stoppy import Stopwatch
stopwatch = Stopwatch(start=True)
sleep(1)
stopwatch.stop()
print(stopwatch.time())
stopwatch.reset()
For more usage examples see examples/.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
stoppy-1.0.0.tar.gz
(1.8 kB
view details)
Built Distribution
File details
Details for the file stoppy-1.0.0.tar.gz
.
File metadata
- Download URL: stoppy-1.0.0.tar.gz
- Upload date:
- Size: 1.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.10.8 Darwin/21.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93569f5e6ea019dfb91e5a8a2c84126b40d4b6cc4960f4502960301b04a78a4a |
|
MD5 | a01b587b6a650e954ab95b514f61914a |
|
BLAKE2b-256 | fd8556dab6c2730080c2f221aa82b52487c915aa5c0a977c8abe1145a53695cd |
File details
Details for the file stoppy-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: stoppy-1.0.0-py3-none-any.whl
- Upload date:
- Size: 2.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.10.8 Darwin/21.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f29b5f4d32d77d549d1c8827a85e462507336e51a49cba964fc09fcedc73cf2c |
|
MD5 | 9d1d50443f6ab9505fc19f905158f357 |
|
BLAKE2b-256 | 94bf21f164bfc184449e57d861208ae83d1fc33c8a6dfb6edcba8e5fc5373ee3 |