#time #duration #instant #wasm

zduny-wasm-timer

Abstraction over std::time::Instant and futures-timer that works on WASM

2 releases

0.2.7 Nov 1, 2022
0.2.6 Nov 1, 2022

#468 in WebAssembly

33 downloads per month
Used in 2 crates

MIT license

75KB
1.5K SLoC

zduny-wasm-timer

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–7MB
~117K SLoC