Skip to main content

TimeRun is a Python library for elapsed time measurement.

Project description

TimeRun

TimeRun - Python library for elapsed time measurement.

License PyPI Latest Release Package Status Code style: black Imports: isort

TimeRun is a simple, yet elegant elapsed time measurement library for Python. It is distributed as a single file module and has no dependencies other than the Python Standard Library.

  • Elapsed Time: Customized time delta which represents elapsed time in nanoseconds.
  • Stopwatch: An elapsed time measurer with the highest available resolution.
  • Timer: Convenient syntax to capture measured elapsed time result and save it.

Setup

Prerequisites

The only prerequisite to use TimeRun is running Python 3.7+.

Installation

Install TimeRun from Python Package Index:

pip install timerun

Install TimeRun from Source Code:

python setup.py install

Quickstart

Measure Code Block

>>> from timerun import Timer
>>> with Timer() as timer:
...     pass  # put your code here
>>> print(timer.duration)
0:00:00.000000100

Measure Function

>>> from timerun import Timer
>>> timer = Timer()
>>> @timer
... def func():
...     pass  # put your code here
>>> func()
>>> print(timer.duration)
0:00:00.000000100

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

timerun-0.2.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

timerun-0.2.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file timerun-0.2.0.tar.gz.

File metadata

  • Download URL: timerun-0.2.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.10

File hashes

Hashes for timerun-0.2.0.tar.gz
Algorithm Hash digest
SHA256 563102695ee17f2bb79f21ea71aeec0f64610e9a71add0fb018e6aa76c73605f
MD5 bbe5478899f554e14cee91eff404d354
BLAKE2b-256 b27fb72769f8a0fa05939d197f450f560a80c645852047d37e5c09d3eae84aab

See more details on using hashes here.

File details

Details for the file timerun-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: timerun-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.10

File hashes

Hashes for timerun-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 60a5863372585e546e5e77627c875f7781fc490132a387871bb19e57bee8543c
MD5 146e747b7589100379858a2edf7192f2
BLAKE2b-256 06e8d8fc77a49bc7d65c08aa6a8b71938e05e614793eee73f18cc39eb661a5a9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page