Skip to main content

The easy stopwatch that is the best

Project description

Stopwatch

Homely stopwatch that can do everything that you want

Installation

pip install easy-stopwatch

Documentation

  1. Stopwatch(flags_limit:int = 10, ticks:int = 1)
    • This class creates a stopwatch
    • ticks in seconds
  2. start() --> None
    • This function start a stopwatch
  3. stop() --> None
    • This function stop a stopwatch
  4. turn_off() --> None
    • This function turn off a stopwatch
  5. time() --> float
    • This function return time
  6. put_flag() --> list
    • This function save a time in flags
    • When you put up a flag
    • flags[0] - first flag
    • flags[1] - second flag

Usage

  1. Import class Stopwatch:
    from easy_stopwatch import Stopwatch
    
  2. Create object stopwatch:
    stopwatch = Stopwatch()
    
  3. Start stopwatch:
    stopwatch.start()
    
  4. Print time:
    print(stopwatch.time())
    

Example code

from easy_stopwatch import Stopwatch

stopwatch = Stopwatch()
stopwatch.start()

while 1:
   if stopwatch.time() >= 5:
      break
   else:
      print(f"{stopwatch.time()}")

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

easy_stopwatch-1.0.2.tar.gz (1.9 kB view details)

Uploaded Source

File details

Details for the file easy_stopwatch-1.0.2.tar.gz.

File metadata

  • Download URL: easy_stopwatch-1.0.2.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.6

File hashes

Hashes for easy_stopwatch-1.0.2.tar.gz
Algorithm Hash digest
SHA256 1e9b3e1569bc067182f0afb28e0721aeef1f90f5750d53ba36fb1c5d8d2cdd15
MD5 b0098ff35e18157c76b5653285e22e6b
BLAKE2b-256 ac5752cb77ae497489986f7a09d3d23d073dd132330c76632d41fb764cfaf0e7

See more details on using hashes here.

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