#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

#251 in WebAssembly

Download history 140/week @ 2024-01-11 123/week @ 2024-01-18 133/week @ 2024-01-25 57/week @ 2024-02-01 47/week @ 2024-02-08 69/week @ 2024-02-15 76/week @ 2024-02-22 91/week @ 2024-02-29 86/week @ 2024-03-07 45/week @ 2024-03-14 80/week @ 2024-03-21 156/week @ 2024-03-28 130/week @ 2024-04-04 89/week @ 2024-04-11 56/week @ 2024-04-18 98/week @ 2024-04-25

407 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