No project description provided
Project description
interval-timer
An interval timer iterator that synchronises iterations to within specific time intervals.
The time taken for code execution within each iteration will not affect the interval timing, provided that the execution time is not longer than the interval period. The caller can check if this is the case by checking the missed
attribute on the returned Interval
instance.
Installation
pip install interval-timer
Usage
from interval_timer import IntervalTimer
for interval in IntervalTimer(1):
print(interval)
# Do time synchronised task once per second here...
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
interval-timer-0.3.0.tar.gz
(2.9 kB
view hashes)
Built Distribution
Close
Hashes for interval_timer-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5dfeaeeff1e8fb98e3918e057659e0c5c9c791d77c3bb859a59739a4b1a87840 |
|
MD5 | 1acc5709bc6295c42aff859a7f861766 |
|
BLAKE2b-256 | 9254fdd9da9be42a13199c5fa7702757e277770b8f0613a65125a69e4e3aacef |