Snooze
Snooze is a crate that allows you to trigger the sending of a message with a specific delay or interval. This is usefull to handle TTL for example.
Usage
Basically, you just need to instanciate an instance of a Notifier
, to which you register events to trigger
at a certain time:
let mut notifier = new;
// do not drop the handle
notifier.notify_afer;
let _handle = notifier.notify_interval;
assert_eq!;
assert_eq!;
assert_eq!;