#time #duration #instant

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

#216 in WebAssembly

Download history 52/week @ 2023-10-26 38/week @ 2023-11-02 29/week @ 2023-11-09 68/week @ 2023-11-16 113/week @ 2023-11-23 146/week @ 2023-11-30 151/week @ 2023-12-07 83/week @ 2023-12-14 164/week @ 2023-12-21 154/week @ 2023-12-28 284/week @ 2024-01-04 167/week @ 2024-01-11 153/week @ 2024-01-18 164/week @ 2024-01-25 80/week @ 2024-02-01 74/week @ 2024-02-08

484 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–9MB
~67K SLoC