Skip to main content

pystopwatch

Multi-functional Simple Stopwatch for Python.

  • Multiple Stopwatch by Tags
  • Manage elapsed times by tags
  • Example of use : profiling python codes(latency by functions, ...)

Install

$ pip install pystopwatch2

Usage

from pystopwatch2 import PyStopwatch

w = PyStopwatch()
w.start(tag='a')
time.sleep(1)
w.pause('a')
e = w.get_elapsed('a')
print(e)
# 1.0xxx

w.start(tag='b')
time.sleep(0.5)
w.pause('b')
print(w)

"""
a: state=ClockState.PAUSE elapsed=1.0027 prev_time=1548382910.66398311
b: state=ClockState.PAUSE elapsed=0.5051 prev_time=1548382911.66670585
"""

e.clear('a')
e.clear('b')

Release files for pystopwatch2 0.1.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 pystopwatch2 0.1.1
File Size Uploaded
pystopwatch2-0.1.1.tar.gz 2.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pystopwatch2 0.1.1
File Interpreter ABI Platform
pystopwatch2-0.1.1-py2-none-any.whl Python 2 none any Details

Total release size: 9.1 kB

Release files / pystopwatch2-0.1.1.tar.gz

Download URL pystopwatch2-0.1.1.tar.gz
Size 2.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ff966a9efd986bada45b2c460c1b84cc658a62ffdb7cbf0e099df4094b3a1600
BLAKE2b-256 checksum
How to use checksums
1431e487eb7e1ba613d6ed88af00a0da147edc3243ba66f6e174979a60ad139d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/2.7.15

Release files / pystopwatch2-0.1.1-py2-none-any.whl

Download URL pystopwatch2-0.1.1-py2-none-any.whl
Size 6.9 kB
Tags Python 2
SHA-256 checksum
How to use checksums
2b434da0b4657015fae5edf4e492504ec53019634f08d8b4f5706cd7c08879ab
BLAKE2b-256 checksum
How to use checksums
4a0a96f24578bbfdb2d3c7d9433414713dd1c90396c20e704fae10c8a69e39c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/2.7.15

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

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