Skip to main content

A miniature timer that does the same thing as a regular timer

Project description

Timer

Small timer that can do parallel computing

Installation

pip install small-timer

Documentation

  1. timer_point(time: Any, repeat:bool = False)
    • time in seconds
    • This function start timer
  2. check_timer() -> bool
    • This function check
    • Was timer fished
  3. check_time() -> list
    • This function check
    • How much time is left
    • check_time[0] - minutes
    • check_time[1] - seconds
  4. restart()
    • This function restart timer

Usage

  1. Import class Timer:
    from small-timer import Timer
    
  2. Create object timer:
    timer = Timer()
    
  3. Create timer and start it:
    timer.timer_point(10)
    
  4. Check timer if timer finished:
    if timer.check_timer():
        print("Timer finished!!!")
    else:
        print("Timer didn't finish")
    

Example code

from small-timer import Timer

timer = Timer()
timer.timer_point(10)

while 1:
    if timer.check_timer():
       print("Timer finished!!!")
       break
    else:
       print("Timer didn't finish")
       print(f"{timer.check_time()[0]}:{timer.check_time()[1]}")
       print()

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

small_timer-1.0.4.tar.gz (1.9 kB view details)

Uploaded Source

File details

Details for the file small_timer-1.0.4.tar.gz.

File metadata

  • Download URL: small_timer-1.0.4.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 small_timer-1.0.4.tar.gz
Algorithm Hash digest
SHA256 f62e274c326a31aa8b6535e51e48644c1e9af86f590d187cdf7ce17a0d2f6a5e
MD5 dd579e9310333326f52ceb5cb52ce03d
BLAKE2b-256 5b1e7e2fc416aa188457e5aa87c2a633495b97f024d8cd980a88eb46b4519519

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