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
- timer_point(time: Any, repeat:bool = False)
- time in seconds
- This function start timer
- check_timer() -> bool
- This function check
- Was timer fished
- check_time() -> list
- This function check
- How much time is left
- check_time[0] - minutes
- check_time[1] - seconds
- restart()
- This function restart timer
Usage
- Import class Timer:
from small-timer import Timer
- Create object timer:
timer = Timer()
- Create timer and start it:
timer.timer_point(10)
- 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.5.tar.gz
(1.9 kB
view details)
File details
Details for the file small_timer-1.0.5.tar.gz
.
File metadata
- Download URL: small_timer-1.0.5.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 084b124a03bc5a13863ff37ebf20124970dea99f1d90d30b964c9c54b052c1a5 |
|
MD5 | c732dc31d390768de5f183299ada8ab0 |
|
BLAKE2b-256 | ea7d9aa577b5e5d0d46922149e173cd3f16f273b00c8f4cbae9977a8efde1b5a |