Loop rate limiters.
Project description
Loop rate limiters
Simple loop frequency regulators in Python with an API similar to rospy.Rate
.
Installation
pip install loop-rate-limiters
Usage
The RateLimiter
class provides a loop frequency limiter:
from loop_rate_limiters import RateLimiter
from time import perf_counter
rate = RateLimiter(frequency=400.0)
while True:
print(f"Hello from loop at {perf_counter():.3f} s")
rate.sleep()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for loop_rate_limiters-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2802041877747c9cf0b392e205dc2aa6c93d0a137d7b9ab4973af4c1c025e652 |
|
MD5 | ed150a0ef391d7e4c5f077a216e09463 |
|
BLAKE2b-256 | 73120062652e375e4d55c15f18f7c4c055d9a762157d2ef62ba512f377b90f96 |