#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

#333 in WebAssembly

Download history 78/week @ 2024-03-11 42/week @ 2024-03-18 132/week @ 2024-03-25 169/week @ 2024-04-01 95/week @ 2024-04-08 62/week @ 2024-04-15 72/week @ 2024-04-22 93/week @ 2024-04-29 64/week @ 2024-05-06 34/week @ 2024-05-13 66/week @ 2024-05-20 69/week @ 2024-05-27 37/week @ 2024-06-03 66/week @ 2024-06-10 108/week @ 2024-06-17 45/week @ 2024-06-24

263 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–8.5MB
~67K SLoC