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


Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for simplestopwatch, version 0.3.3
Filename, size File type Python version Upload date Hashes
Filename, size simplestopwatch-0.3.3.zip (5.1 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page