#instant #duration #web-worker #time

zduny-wasm-timer

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

3 releases

0.2.8 Sep 14, 2023
0.2.7 Nov 1, 2022
0.2.6 Nov 1, 2022

#196 in WebAssembly

Download history 59/week @ 2023-12-11 88/week @ 2023-12-18 149/week @ 2023-12-25 186/week @ 2024-01-01 185/week @ 2024-01-08 104/week @ 2024-01-15 137/week @ 2024-01-22 115/week @ 2024-01-29 43/week @ 2024-02-05 53/week @ 2024-02-12 68/week @ 2024-02-19 97/week @ 2024-02-26 73/week @ 2024-03-04 78/week @ 2024-03-11 42/week @ 2024-03-18 132/week @ 2024-03-25

331 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–9.5MB
~67K SLoC