Skip to content

➿ Python library for easy timing without `time.sleep()`

License

Notifications You must be signed in to change notification settings

JakubAndrysek/metronome_loop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

metronome-loop

Library for easy timing without time.sleep()

Example use

import metronome_loop


def five_sec_prin():
    print("five_sec")


one_sec = metronome_loop.metronome(1000, lambda: print("one_sec"))
five_sec = metronome_loop.metronome(5000, five_sec_prin)
ten_sec = metronome_loop.metronome(10000)

while True:
    one_sec.loop()

    five_sec.loop()

    if ten_sec.loop():
        print("ten_sec")

About

➿ Python library for easy timing without `time.sleep()`

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages