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
>>> print t
15.9507198334 sec
>>> t.stop()
>>> 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

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 (5.1 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page