#duration #instant

zduny-wasm-timer

Abstraction over std::time::Instant and futures-timer that works on WASM

4 releases

0.2.9 Mar 17, 2025
0.2.8 Sep 14, 2023
0.2.7 Nov 1, 2022
0.2.6 Nov 1, 2022

#121 in WebAssembly

Download history 307/week @ 2024-12-07 136/week @ 2024-12-14 73/week @ 2024-12-21 106/week @ 2024-12-28 269/week @ 2025-01-04 220/week @ 2025-01-11 143/week @ 2025-01-18 149/week @ 2025-01-25 159/week @ 2025-02-01 374/week @ 2025-02-08 222/week @ 2025-02-15 196/week @ 2025-02-22 155/week @ 2025-03-01 149/week @ 2025-03-08 314/week @ 2025-03-15 115/week @ 2025-03-22

765 downloads per month
Used in 3 crates

MIT license

77KB
1.5K SLoC

zduny-wasm-timer

Test Status Crate API

Exports the Instant, Delay, Interval and Timeout structs.

On non-WASM targets, this re-exports the types from tokio-timer. On WASM targets, this uses web-sys and js-sys to implement their functionalities.

Works in Web Workers.

https://crates.io/crates/zduny-wasm-timer

ko-fi

see also

wasm-bindgen

web-sys

js_sys

Dependencies

~1–8MB
~69K SLoC