PlatformTimeUpdateNotifier


interface PlatformTimeUpdateNotifier


Interface used to notify all time based dynamic types that they should be updated with the new platform time (system time).

It's up to the implementations to chose at what frequency updates should be sent.

Summary

Public functions

Unit

Clears the receiver from the notifier.

Unit
setReceiver(executor: Executor, tick: Runnable)

Sets the callback to be called whenever platform time needs to be reevaluated.

Public functions

clearReceiver

Added in 1.0.0
fun clearReceiver(): Unit

Clears the receiver from the notifier.

setReceiver

Added in 1.0.0
fun setReceiver(executor: Executor, tick: Runnable): Unit

Sets the callback to be called whenever platform time needs to be reevaluated.

Calling this method while there is already a receiver set, should replace the previous receiver.

Parameters
executor: Executor

The Executor to run the given tick on.

tick: Runnable

The callback to run whenever platform time needs to be reevaluated. This callback should be invoked by the implementation of this interface whenever platform time needs to be reevaluated.