44 if ((
self = [super init])) {
48 now = [UNIVERSE getTime];
81 NSString* intervalDesc =
nil;
84 intervalDesc =
@"one-shot";
86 intervalDesc = [
NSString stringWithFormat:@"interval: %g", _interval];
88 return [
NSString stringWithFormat:@"nextTime: %g, %@, %srunning", _nextTime, intervalDesc, _isScheduled ? "" : "not "];
136 [sDeferredTimers addObject:
self];
162 now = [UNIVERSE getTime];
191 NSArray* timers =
nil;
196 foreach (timer, timers) {
206 now = [UNIVERSE getTime];
213 scaled = ceil(scaled);
232 @catch (NSException* exception) {
233 OOLog(
kOOLogException,
@"\n\n***** Ignoring Timer Exception: %@ : %@ *****\n\n", [exception name], [exception reason]);
237 return NSOrderedAscending;
239 return NSOrderedDescending;
241 return NSOrderedSame;
NSString *const kOOLogException
#define OOLogGenericSubclassResponsibility()
#define OOLog(class, format,...)
static NSMutableArray * sDeferredTimers
static OOPriorityQueue * sTimers
void removeExactObject:(id object)
void addObject:(id object)
void addObjects:(id collection)
NSArray * sortedObjects()
BOOL isValidForScheduling()
NSString * descriptionComponents()
OOTimeAbsolute nextTime()
id initWithNextTime:interval:(OOTimeAbsolute nextTime,[interval] OOTimeDelta interval)