Skip to main content

Library for easy timing without time.sleep()

Project description

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")

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

metronome_loop-0.1.0.tar.gz (2.0 kB view hashes)

Uploaded Source

Built Distribution

metronome_loop-0.1.0-py3-none-any.whl (2.9 kB view hashes)

Uploaded Python 3

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