From 6a584af1411b713fab52400712031bfa82bccd18 Mon Sep 17 00:00:00 2001 From: Kitsu Date: Sun, 2 Feb 2025 22:44:05 -0300 Subject: Use working wasmtimer for time::every --- examples/todos/Cargo.toml | 2 +- examples/todos/src/main.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/todos/Cargo.toml b/examples/todos/Cargo.toml index 5d42a88d..2b49e4e9 100644 --- a/examples/todos/Cargo.toml +++ b/examples/todos/Cargo.toml @@ -24,7 +24,7 @@ iced.features = ["debug", "webgl", "fira-sans"] uuid = { version = "1.0", features = ["js"] } web-sys = { workspace = true, features = ["Window", "Storage"] } -wasm-timer.workspace = true +wasmtimer.workspace = true [dev-dependencies] iced_test.workspace = true diff --git a/examples/todos/src/main.rs b/examples/todos/src/main.rs index 7faf742e..74c4c464 100644 --- a/examples/todos/src/main.rs +++ b/examples/todos/src/main.rs @@ -578,7 +578,8 @@ impl SavedState { .set_item("state", &json) .map_err(|_| SaveError::Write)?; - let _ = wasm_timer::Delay::new(std::time::Duration::from_secs(2)).await; + let _ = + wasmtimer::tokio::sleep(std::time::Duration::from_secs(2)).await; Ok(()) } -- cgit