#duration #instant #timer #time

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

#65 in WebAssembly

Download history 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 143/week @ 2025-03-22 316/week @ 2025-03-29 333/week @ 2025-04-05 372/week @ 2025-04-12 560/week @ 2025-04-19 4866/week @ 2025-04-26 3090/week @ 2025-05-03

8,929 downloads per month
Used in 5 crates (4 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–8.5MB
~69K SLoC