pub fn use_timestamp() -> Signal<f64>
Expand description
Reactive current timestamp.
§Demo
§Usage
let timestamp = use_timestamp();
With controls:
let UseTimestampReturn {
timestamp,
is_active,
pause,
resume,
} = use_timestamp_with_controls();
§SendWrapped Return
The returned closures pause
and resume
of the ..._with_controls
versions are
sendwrapped functions. They can only be called from the same thread that called
use_timestamp_with_controls
.
§Server-Side Rendering
On the server this function will return a signal with the milliseconds since the Unix epoch.
But the signal will never update (as there’s no request_animation_frame
on the server).