Skip to content

Commit

Permalink
Fix over-resume in ERExponentialTimer
Browse files Browse the repository at this point in the history
  • Loading branch information
EricRabil committed Jul 14, 2022
1 parent ef394f1 commit 375389d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Sources/Swexy/Utilities/ERTimer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public class ERTimer {
}

public func reschedule(fromNow: DispatchTimeInterval) {
timer.suspend()
timer.schedule(deadline: .now().advanced(by: fromNow))
#if DEBUG && canImport(Swog)
log.info("Rescheduled timer for \(String(describing: fromNow))")
Expand Down

0 comments on commit 375389d

Please sign in to comment.