https://github.com/Zuph/AVRQueue -- This is a simple queuing library. Add functions to the queue, along with a unique identifier, an initial run time, and a recurrence time. If your time scale is in seconds, an item with an initial run time of 1, and a recurrence of 5 will run after time 1 second, and every 5 seconds thereafter. Functions are not guaranteed to execute deterministic when they're scheduled. This is a very primitive library. The run function simply waits for a function in the queue to reach its run time, runs the function, then continues through the queue. If queued functions take a very long time to execute, then functions may not execute precisely when desired. For this reason, a "now" variable is passed into every function in order to let it know when it actually runs.
Share this library with your friends on your favorite profile: