summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLibravatar Héctor <hector@hecrj.dev>2025-02-16 22:40:57 +0100
committerLibravatar GitHub <noreply@github.com>2025-02-16 22:40:57 +0100
commitd7563ee94ad70a0105cd8a41334392a19bc91dd2 (patch)
treea68a13ba447b91951efcb599d48ce4034545133c /examples
parentd6848977bcad767a8e8ae83b5069726615886947 (diff)
parent6a584af1411b713fab52400712031bfa82bccd18 (diff)
downloadiced-d7563ee94ad70a0105cd8a41334392a19bc91dd2.tar.gz
iced-d7563ee94ad70a0105cd8a41334392a19bc91dd2.tar.bz2
iced-d7563ee94ad70a0105cd8a41334392a19bc91dd2.zip
Merge pull request #2780 from l4l/forked-wasmtimer
Use working wasmtimer for time::every
Diffstat (limited to 'examples')
-rw-r--r--examples/todos/Cargo.toml2
-rw-r--r--examples/todos/src/main.rs3
2 files changed, 3 insertions, 2 deletions
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 dfb73d96..033cb122 100644
--- a/examples/todos/src/main.rs
+++ b/examples/todos/src/main.rs
@@ -579,7 +579,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(())
}