Expand description
Platform-specific async runtime abstractions.
NodeDB-Lite compiles for native (Tokio) and WASM (wasm-bindgen-futures).
This module provides a thin abstraction over the differences so engine
code doesn’t need #[cfg] everywhere.
Native (iOS/Android/Desktop): Tokio — spawn, spawn_blocking, sleep.
WASM (Browser): wasm-bindgen-futures — spawn_local, no blocking threads.
Functions§
- interval
- Create a recurring interval timer.
- now_
millis - Get the current timestamp in milliseconds since Unix epoch.
- now_
secs - Get the current timestamp in seconds since Unix epoch.
- sleep
- Sleep for a duration.
- spawn
- Spawn a future on the runtime.
- spawn_
blocking - Run a blocking closure off the async runtime.