mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-29 11:28:49 +00:00
Fixed: CPTimer number of seconds interval set to 0.1 if less than or equal to 0.0
Cocoa specs here: https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSTimer_Class/Reference/NSTimer.html ... "Parameters seconds The number of seconds between firings of the timer. If seconds is less than or equal to 0.0, this method chooses the nonnegative value of 0.1 milliseconds instead."
This commit is contained in:
1 parent
2ca020f3a9
commit
3419f6fbb4
1 file changed
+2
-2
@@ -112,7 +112,7 @@
|
||||
|
||||
if (self)
|
||||
{
|
||||
_timeInterval = seconds;
|
||||
_timeInterval = MAX(seconds,0.1);
|
||||
_invocation = anInvocation;
|
||||
_repeats = shouldRepeat;
|
||||
_isValid = YES;
|
||||
@@ -150,7 +150,7 @@
|
||||
|
||||
if (self)
|
||||
{
|
||||
_timeInterval = seconds;
|
||||
_timeInterval = MAX(seconds,0.1);
|
||||
_callback = aFunction;
|
||||
_repeats = shouldRepeat;
|
||||
_isValid = YES;
|
||||
|
||||
Reference in new issue
Block a user