Skip to main content

A simple stopwatch for Python.

Install

Requires Python 3.5+

pip install stopwatch.py

Usage

from stopwatch import Stopwatch

# Argument specifies decimal precision for __str__
# e.g 2 digits = 1.00, 3 digits = 1.000
# Optional, defaults to 2
stopwatch = Stopwatch(2) # Start a stopwatch
# It's just math with time.perf_counter() so there isn't really a task
# running in background

stopwatch.stop() # Stop stopwatch, time freezes
stopwatch.start() # Start it again
stopwatch.reset() # Reset it back to 0
stopwatch.restart() # Reset and start again
stopwatch.running # Whether stopwatch is running
stopwatch.duration # Get the duration (in seconds)
str(stopwatch) # Get a friendly duration string

License

MIT

Release files for stopwatch.py 2.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stopwatch.py 2.0.1
File Size Uploaded
stopwatch.py-2.0.1.tar.gz 2.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for stopwatch.py 2.0.1
File Interpreter ABI Platform
stopwatch.py-2.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 6.4 kB

Release files / stopwatch.py-2.0.1.tar.gz

Download URL stopwatch.py-2.0.1.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
8cc94ba0f6469d434eabd8b227166e595fd42350e7f66dbf1a1a80697f60cc79
BLAKE2b-256 checksum
How to use checksums
8d141815e24c29c2f2ea1e8cb17ae72357c1151af02b9137b29ccab973ec7f73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.8.3 requests/2.28.0 setuptools/58.1.0 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.10.5

Release files / stopwatch.py-2.0.1-py3-none-any.whl

Download URL stopwatch.py-2.0.1-py3-none-any.whl
Size 3.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5802a0178d766120c11dd5df8ae838e9beccb8c88329dbd5f0f7ac4b7fed9107
BLAKE2b-256 checksum
How to use checksums
7a6516e128bfa30b4d63362c5ead733bc5a95c2b4241a0a193dc44e290ab2080
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.8.3 requests/2.28.0 setuptools/58.1.0 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.10.5

Release history Release notifications | RSS feed

This release

2.0.1 This release

2 release files

2.0.0

2 release files

1.1.0

2 release files

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page