Overview
This crate provides scheduler that executes async callback at certain point. Scheduler works on the tokio runtime.
Usage
Create scheduler using queue::SchedQueue
let sq = new;
Callback type:
type Callback = ;
Add task with callback. Callback will be triggered 1 second after the task is added, and will be rescheduled for 10 times after the callback has triggered.
sq.add.await;
Two types of task can be added to queue. SchedType::Timestamp(SystemTime) specifies the exact
timestamp that the callback will be triggered at. SchedType::Delay(Duration, usize) specifies
when the callback will be triggered after the task is added and how many times will it be
rescheduled.