Timer
Timer copied to clipboard
Issues with progress observing
Without using publish method we get several problems:
- Method
onTimerProgressChangewill cause infinite calling in completion with time 0.0 - Method
onTimerActivityChangewill call completion only once on start
try? MTimer
.createNewInstance()
// .publish(every: time) { _ in } // i don't use it
.onTimerProgressChange { print($0) } // causes a loop
.onTimerActivityChange { print($0) } // will be called once on start
.start(from: .zero, to: time)