Timer icon indicating copy to clipboard operation
Timer copied to clipboard

Issues with progress observing

Open alina-p-k opened this issue 1 year ago • 0 comments

Without using publish method we get several problems:

  1. Method onTimerProgressChange will cause infinite calling in completion with time 0.0
  2. Method onTimerActivityChange will 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)

alina-p-k avatar Apr 02 '24 15:04 alina-p-k