Skip to main content

No project description provided

Project description

StopWatch

This is a simple python utility for tracking time of operations.

Usage

StopWatch can be used manually.

from stopwatch import StopWatch

stopwatch = StopWatch()
stopwatch.start()

# Do some operations to be timed

stopwatch.stop()
stopwatch.display_elapsed() # writes to stdout using print()

Or it can be used as a context manager

from stopwatch import StopWatch

with StopWatch():
    # Perform some operations here in place of pass
    # StopWatch will call display_elapsed() upon exiting 
    # 'with' block
    pass

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

my_stopwatch-1.0.1-py3-none-any.whl (2.6 kB view hashes)

Uploaded Python 3

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