mirror of
https://github.com/pcvolkmer/checkbar.git
synced 2025-04-19 11:06:50 +00:00
Use tokio::time::sleep
This commit is contained in:
parent
9858f6f7b6
commit
01bc8e7ade
2
LICENSE
2
LICENSE
@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 Paul-Christian Volkmer
|
||||
Copyright (c) 2023 Paul-Christian Volkmer
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -1,6 +1,7 @@
|
||||
use checkbar::{get_click_cmd, print_states, read_click_event, run_click_cmd, Config, MouseButton};
|
||||
use serde_json::json;
|
||||
use tokio::task;
|
||||
use tokio::time::sleep;
|
||||
|
||||
#[tokio::main(flavor = "multi_thread", worker_threads = 2)]
|
||||
async fn main() {
|
||||
@ -31,7 +32,7 @@ async fn main() {
|
||||
loop {
|
||||
let config = Config::read();
|
||||
print_states(&config.checks).await;
|
||||
std::thread::sleep(config.interval);
|
||||
let _ = sleep(config.interval).await;
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user