rawtimer
a simple timer manager.
GitHub repo: https://github.com/GGN-2015/rawtimer
Installation
pip install rawtimer
Usage
import rawtimer
import time
rawtimer.begin_timer("timer_name_1")
time.sleep(2.0) # Do something that you want to time
rawtimer.end_timer("timer_name_1") # this will output a line into stdout
# means do not output to show time cost
with rawtimer.timer_silent():
rawtimer.begin_timer("timer_name_1")
time.sleep(2.0)
time_cost = rawtimer.end_timer("timer_name_1") # silent
print(f"time_cost: {time_cost:13.3f}s") # you can output yourself
# you can use this function to make alignment, if necessary
rawtimer.set_default_min_name_len(30)
# if the timer name begins with character '$', when output, its name will be in yellow
rawtimer.begin_timer("$special_timer_1")
time.sleep(2.0)
rawtimer.end_timer("$special_timer_1")
# if the timer name begins with character '#', when output, its name will be in red
rawtimer.begin_timer("#special_timer_2")
time.sleep(2.0)
rawtimer.end_timer("#special_timer_2")
Metadata
Release files for rawtimer 0.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rawtimer-0.0.0.tar.gz | 3.1 kB | Without provenance | Details for rawtimer-0.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rawtimer-0.0.0-py3-none-any.whl | Python 3 | none | any | Details for rawtimer-0.0.0-py3-none-any.whl |
Total release size: 6.6 kB
Release files / rawtimer-0.0.0.tar.gz
| Download URL | rawtimer-0.0.0.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b19b43ae93b57943c59bbcf196f023dd492197dc045e226d2cf64eae33adf386
|
|
BLAKE2b-256 checksum How to use checksums |
a881f952e9612fd572f4b451df066da7565ec7947647d51b1608553a4a425b3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.12.7 Linux/6.17.7-aosc-main
|
Release files / rawtimer-0.0.0-py3-none-any.whl
| Download URL | rawtimer-0.0.0-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c7f3319f95eb30a07d567ea8afdbe94b77c47d43bbd9e513368b0dac67ea903c
|
|
BLAKE2b-256 checksum How to use checksums |
8bad9eed0ec90eb435f7c785e8cc7d0fc2b65b1dd6dfe1ceb4605f169b0956fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.12.7 Linux/6.17.7-aosc-main
|
Security for rawtimer 0.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.