#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

#418 in WebAssembly

Download history 74/week @ 2024-07-20 99/week @ 2024-07-27 123/week @ 2024-08-03 84/week @ 2024-08-10 61/week @ 2024-08-17 109/week @ 2024-08-24 52/week @ 2024-08-31 76/week @ 2024-09-07 47/week @ 2024-09-14 115/week @ 2024-09-21 152/week @ 2024-09-28 68/week @ 2024-10-05 88/week @ 2024-10-12 91/week @ 2024-10-19 202/week @ 2024-10-26 73/week @ 2024-11-02

456 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