TimerLiveData
class TimerLiveData<T>(delayMs: Long, computeValue: () -> T) : LiveData<T>
Content copied to clipboard
A LiveData which updates its value every delayMs. Override computeValue to provide the new value for each period. Its value will only be updated while there are active observers.
Parameters
T
The type of the LiveData values.
delayMs
The delay between each update of the value.
computeValue
The periodically called function to compute the new value.