Skip to main content

A precise stopwatch built on top of perf_counter.

Project description

stoppy ⏱

A precise stopwatch built on top of perf_counter, which

The stopwatch can optionally be started automatically by calling time instead of start, which can streamline usage when polling the time repeatedly.

Installation

Install from PyPI via:

pip install stoppy

Usage

Basic usage is as follows:

from time import sleep
from stoppy import Stopwatch

stopwatch = Stopwatch(start=True)
sleep(1)
stopwatch.stop()
print(stopwatch.time())
stopwatch.reset()

For more usage examples see examples/.

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

stoppy-1.0.0.tar.gz (1.8 kB view hashes)

Uploaded Source

Built Distribution

stoppy-1.0.0-py3-none-any.whl (2.1 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