Skip to main content

The simplest way to time a block of code.

Project description

ez-timer

The easiest way to time a function call in Python.

Installation

ez-timer can be installed from pypi:

pip install ez-timer

Usage

Using ez-timer is simple:

from ez_timer import ez_timer

with ez_timer() as timer:
  # run expensive computation
  time.sleep(1)

print(timer.result)
# > 1.0001

That's all. That is the API.

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

ez-timer-0.0.1.tar.gz (2.3 kB view hashes)

Uploaded Source

Built Distribution

ez_timer-0.0.1-py3-none-any.whl (2.3 kB view hashes)

Uploaded Python 3

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