Skip to main content

Easily measure time

Project description

This is a simple stopwatch class. Example:

from tados_stopwatch import Stopwatch
import time

s = Stopwatch()

s.start()
time.sleep(3)
print(s.get())

time.sleep(2)
s.stop()
print(s.get())

s.reset()

s.set(14)

s.bind(3, lambda: print("3 seconds have passed"))

while s.get() < 5:
    print("Updated")
    time.sleep(1)

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

tados_stopwatch-0.0.2.tar.gz (1.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tados_stopwatch-0.0.2-py3-none-any.whl (2.2 kB view details)

Uploaded Python 3

File details

Details for the file tados_stopwatch-0.0.2.tar.gz.

File metadata

  • Download URL: tados_stopwatch-0.0.2.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for tados_stopwatch-0.0.2.tar.gz
Algorithm Hash digest
SHA256 e209e762b16014aed52e44a5cfd3d57ddee958c4ef811bf9c9bd1b85241f7ba5
MD5 c490086a8bca277942259646742f2b91
BLAKE2b-256 ec37940cc6862cf59edfb2cab314265901ac8f9509855863461fc7701f2006b6

See more details on using hashes here.

File details

Details for the file tados_stopwatch-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for tados_stopwatch-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 06bffd649f2af9b3ee157ef4ef360a0e1ead5a88dbe823e918072efeaebaac02
MD5 2dc3ceec2a6aa389005a090a1088d838
BLAKE2b-256 8dac651f14a2a3143db10307960f157e545ae508bdf4c4a9603617f651b5f2bd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page