Skip to main content

A very simple python module for measuring elapsed time.

Project description

simplestopwatch is a very simple Python module for measuring time.
Great for finding out how long code takes to execute.

>>> import simplestopwatch as sw
>>> t = sw.Timer()
>>> t.elapsed
3.8274309635162354
>>> print t
15.9507198334 sec
>>> t.stop()
30.153270959854126
>>> print t
30.1532709599 sec

Decorator exists for printing out execution times:
>>> from simplestopwatch import clockit
>>> @clockit
def mult(a, b):
return a * b
>>> print mult(2, 6)
mult in 1.38282775879e-05 sec
6

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

simplestopwatch-0.3.3.zip (5.1 kB view details)

Uploaded Source

File details

Details for the file simplestopwatch-0.3.3.zip.

File metadata

File hashes

Hashes for simplestopwatch-0.3.3.zip
Algorithm Hash digest
SHA256 303fdcde070a14c490477783f9e8819b0da5b819a1f0260ae1c73066b615f7cc
MD5 d9f4051a7640f309ec960e883573aab0
BLAKE2b-256 f1db0fe78106f07cce55d878796afbd5d1e4e755b4e4ba2b8da304817c806337

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