This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
StopWatch - Multi-clock

StopWatch is meant to provide an easy interface to stopwatch like functionality within code. However, instead of a single clock, it can do multiple clocks, each with their own label/title and properties.

This was meant to help keep track of how long parts of code execute. Because there are times where you want to see only a portion of the code runs within a loop and don't want the complexity of instantiating, tracking, etc. variables yourself, this helps abstract that complexity away and still give what you want.

Feature Summary

1. Multiple clocks within one stopwatch
2. Multiple laps allowed per clock
3. Create summary message per clock or for entire stopwatch
4. Retrieve summary time for clock in human readable or epoch formats
5. Decorator to time individual functions (and log to specified destination)


From the command line::

pip install StopWatch

If StopWatch is already installed, you can upgrade to the latest version with::

pip install --upgrade StopWatch


StopWatch (all commands demo'ed)::

sw = StopWatch('StopWatch Title','Default Clock Name','Default Clock Title')
sw.addclock('newclock1','New Clock 1')
sw.addclock('newclock2','New Clock 2')
if sw.isstarted('newclock2'):
print('newclock2 is started')
elif sw.isstopped('newclock2'):
print('newclock2 is stopped')
if sw.everused():
print('default clock was used at least once.')
print('newclock1 ran %s laps for %s seconds' % (sw.clocklapcount('newclock1'),sw.clocktotalsecs('newclock1'))
print('started clocks: %s' % sw.startedclocks())
print('stopped clocks: %s' % sw.stoppedclocks())
print('used clocks: %s' % sw.usedclocks())
print('all clocks in stopwatch: %s' % sw.availableclocks())

timeit decorator::

Will log the clock summary to logger at info level

def ping100(ip):
os.system('ping -c 100 %s' % ip)


Feel free to send any feedback you may have regarding this project to
Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pyStopWatch-0.4.3.tar.gz (7.0 kB) Copy SHA256 Checksum SHA256 Source Jan 24, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting