timerpy
Measure execution time of code sections.
Installation
python3 -m pip install timerpy
Usage Examples
from timerpy import Timer
with Timer():
# Some code
>>>TIME ELAPSED: 0:00:01.199748
# Specify message
with Timer('HELLO WORLD'):
# Some code
>>>HELLO WORLD TIME ELAPSED: 0:02:15.242731
# Specify output
from logging import info # Write to log file
with Timer('HELLO WORLD', info):
# Some code
>>>timer.py: INFO: stop(): 44: HELLO WORLD TIME ELAPSED: 0:00:01.200157
# Get elapsed time as float value
with Timer() as timer1:
# Some code
nanoseconds = timer1.elapsed_time
print(nanoseconds)
>>>TIME ELAPSED: 0:00:01.400193
>>>1400192600
Metadata
Release files for timerpy 1.1.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 |
|---|---|---|---|---|
| timerpy-1.1.0.tar.gz | 2.0 kB | Without provenance | Details for timerpy-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| timerpy-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for timerpy-1.1.0-py3-none-any.whl |
Total release size: 5.2 kB
Release files / timerpy-1.1.0.tar.gz
| Download URL | timerpy-1.1.0.tar.gz |
|---|---|
| Size | 2.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6db4c45d517e56eae1c56842dd7614e187bd6436c7ed31ed14e4bd3c9c0d567a
|
|
BLAKE2b-256 checksum How to use checksums |
de1e282b27194b757b0ca91e0ddea3550beef8b617fafecb5451a44e55b21056
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0
|
Release files / timerpy-1.1.0-py3-none-any.whl
| Download URL | timerpy-1.1.0-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
83dd4459411b0dba4e1d77243a210dca615556740ee035754fae5f6c1ab96ea3
|
|
BLAKE2b-256 checksum How to use checksums |
6257822af3f492752aeaa80994fecf7ce2e6a71c5156682c7dacbce9455f38bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0
|
Security for timerpy 1.1.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.