#time-instant #instant #duration

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

#62 in WebAssembly

Download history 2535/week @ 2025-06-02 1737/week @ 2025-06-09 2227/week @ 2025-06-16 1853/week @ 2025-06-23 1740/week @ 2025-06-30 2356/week @ 2025-07-07 2233/week @ 2025-07-14 2165/week @ 2025-07-21 1936/week @ 2025-07-28 2173/week @ 2025-08-04 1591/week @ 2025-08-11 2278/week @ 2025-08-18 1950/week @ 2025-08-25 2004/week @ 2025-09-01 2313/week @ 2025-09-08 2804/week @ 2025-09-15

9,117 downloads per month
Used in 8 crates (5 directly)

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–9MB
~68K SLoC