#web-worker #instant #duration #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

#439 in WebAssembly

Download history 113/week @ 2024-06-16 48/week @ 2024-06-23 23/week @ 2024-06-30 123/week @ 2024-07-07 88/week @ 2024-07-14 76/week @ 2024-07-21 94/week @ 2024-07-28 124/week @ 2024-08-04 82/week @ 2024-08-11 60/week @ 2024-08-18 116/week @ 2024-08-25 43/week @ 2024-09-01 84/week @ 2024-09-08 42/week @ 2024-09-15 120/week @ 2024-09-22 146/week @ 2024-09-29

393 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
~68K SLoC