Skip to main content

subscribe_date_change

Function subscribe_date_change 

Source
pub fn subscribe_date_change(
    notify: Arc<dyn Fn() + Send + Sync>,
) -> DateChangeSubscription
Expand description

Registers notify to be called once each time the date in the user’s time zone changes: when local midnight passes, or when the user moves to a time zone where it is another day. Called on a Host worker thread, or in a browser at the start of a frame, so it does what any worker does with a change: update a signal, which asks for a frame.