You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
extensionRepeater.Interval{/// safeSeconds fix issue with int range overflow in Repeater.Interval.Interval.Seconds./// It should be used instead of Repeater.Interval.Interval.Secondsstaticfunc safeSeconds(_ seconds:Double)->Self{/// Repeater uses milliseconds as basic unit. It converts seconds to millisecondsletsecondsInMiliseconds=Double(seconds)* Double(1000)/// check if seconds expressed in miliseconds overflows int range
if secondsInMiliseconds.isInIntRange {return.seconds(seconds)}else{letoverflowValue= seconds >=0 ? Int.max :Int.min
return.milliseconds(overflowValue)}}}
On iPhone 5 with 32 bits processor it is possible to make int overflow. The underlay seconds:
which can exceeding the scope of int
The text was updated successfully, but these errors were encountered: