mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-20 09:20:41 +00:00
Fixed: constant name was misleading.
Previously CPTimerMinTimeInterval was used as a constant for the *default* time interval used when a timer was initialized with an interval <= 0. It isn't the minimum, it is possible to create a timer with an interval less than that constant's value. The name has been changed to CPTimerDefaultTimeInterval to make it clearer what it's purpose is. It has also been changed to a #define, that will result in smaller generated code.
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
@import "CPObject.j"
|
||||
@import "CPRunLoop.j"
|
||||
|
||||
var CPTimerMinTimeInterval = 0.1;
|
||||
#define CPTimerDefaultTimeInterval 0.1
|
||||
|
||||
/*!
|
||||
@class CPTimer
|
||||
@@ -114,7 +114,7 @@ var CPTimerMinTimeInterval = 0.1;
|
||||
|
||||
if (self)
|
||||
{
|
||||
_timeInterval = (seconds <= 0) ? CPTimerMinTimeInterval : seconds;
|
||||
_timeInterval = (seconds <= 0) ? CPTimerDefaultTimeInterval : seconds;
|
||||
_invocation = anInvocation;
|
||||
_repeats = shouldRepeat;
|
||||
_isValid = YES;
|
||||
@@ -152,7 +152,7 @@ var CPTimerMinTimeInterval = 0.1;
|
||||
|
||||
if (self)
|
||||
{
|
||||
_timeInterval = (seconds <= 0) ? CPTimerMinTimeInterval : seconds;
|
||||
_timeInterval = (seconds <= 0) ? CPTimerDefaultTimeInterval : seconds;
|
||||
_callback = aFunction;
|
||||
_repeats = shouldRepeat;
|
||||
_isValid = YES;
|
||||
|
||||
Reference in New Issue
Block a user