Async init (#6)
catapult PR / Rustfmt (pull_request) Successful in 36s
catapult PR / Check (pull_request) Successful in 1m22s
catapult PR / Clippy (pull_request) Successful in 1m33s

Reviewed-on: #6
This commit was merged in pull request #6.
This commit is contained in:
2026-06-21 17:32:17 -04:00
parent cbd96dd5b2
commit af2cb3efdc
3 changed files with 1919 additions and 2 deletions
+9 -2
View File
@@ -1,3 +1,10 @@
fn main() {
println!("Hello, world!");
// TODO: Move this somewhere else
pub const SECONDS_TO_SLEEP: u64 = 5;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
loop {
println!("Do some work");
tokio::time::sleep(tokio::time::Duration::from_secs(SECONDS_TO_SLEEP)).await;
}
}