Crates.io | illmatic-scheduling |
lib.rs | illmatic-scheduling |
version | 0.1.2 |
source | src |
created_at | 2021-05-29 04:46:33.051817 |
updated_at | 2021-05-29 20:54:49.532018 |
description | Scheduling library avoiding to dirturb someone. |
homepage | https://github.com/ledyba/illmatic-scheduling |
repository | https://github.com/ledyba/illmatic-scheduling |
max_upload_size | |
id | 403404 |
size | 44,612 |
let rt = tokio::runtime::Builder::new_multi_thread().enable_time().build().unwrap();
rt.block_on(async move {
let mut mgr = illmatic_scheduling::JobManager::new(&["firefox"], 10.0);
for _i in 0..10 {
if let Ok(count) = mgr.watch().await {
// You have a `count` times to do something.
}
sleep(Duration::from_millis(1000)).await;
}
});
AGPL v3 or later