A timer module. Makes it easy to track elapsed time.
Project description
Description
A timer module. Makes it easy to track elapsed time.
License
GPL 2.0/LGPL 2.1
Installation
Latest stable version on PyPI:
$ pip install simple_timer
Latest development version:
$ pip install -e hg+http://bitbucket.org/barseghyanartur/timer#egg=simple_timer
Usage example
>>> from simple_timer import Timer >>> my_timer = Timer() >>> my_timer.stop() >>> print my_timer.timedelta datetime.timedelta(0, 4, 56711) >>> print my_timer.duration 4.56711 >>> my_timer.stop_and_return_timedelta() datetime.timedelta(0, 52, 367428) >>> print my_timer.duration 52.367428 >>> my_timer.stop_and_return_timedelta() datetime.timedelta(0, 167, 392662) >>> my_timer.stop_and_return_duration() 183.344704
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
simple_timer-0.1.tar.gz
(2.2 kB
view hashes)