157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
|
return [timer autorelease];
}
#ifdef OF_HAVE_BLOCKS
+ (instancetype)scheduledTimerWithTimeInterval: (OFTimeInterval)timeInterval
repeats: (bool)repeats
block: (of_timer_block_t)block
{
void *pool = objc_autoreleasePoolPush();
OFDate *fireDate = [OFDate dateWithTimeIntervalSinceNow: timeInterval];
id timer = [[[self alloc] initWithFireDate: fireDate
interval: timeInterval
repeats: repeats
block: block] autorelease];
|
|
|
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
|
return [timer autorelease];
}
#ifdef OF_HAVE_BLOCKS
+ (instancetype)scheduledTimerWithTimeInterval: (OFTimeInterval)timeInterval
repeats: (bool)repeats
block: (OFTimerBlock)block
{
void *pool = objc_autoreleasePoolPush();
OFDate *fireDate = [OFDate dateWithTimeIntervalSinceNow: timeInterval];
id timer = [[[self alloc] initWithFireDate: fireDate
interval: timeInterval
repeats: repeats
block: block] autorelease];
|
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
|
return [timer autorelease];
}
#ifdef OF_HAVE_BLOCKS
+ (instancetype)timerWithTimeInterval: (OFTimeInterval)timeInterval
repeats: (bool)repeats
block: (of_timer_block_t)block
{
void *pool = objc_autoreleasePoolPush();
OFDate *fireDate = [OFDate dateWithTimeIntervalSinceNow: timeInterval];
id timer = [[[self alloc] initWithFireDate: fireDate
interval: timeInterval
repeats: repeats
block: block] autorelease];
|
|
|
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
|
return [timer autorelease];
}
#ifdef OF_HAVE_BLOCKS
+ (instancetype)timerWithTimeInterval: (OFTimeInterval)timeInterval
repeats: (bool)repeats
block: (OFTimerBlock)block
{
void *pool = objc_autoreleasePoolPush();
OFDate *fireDate = [OFDate dateWithTimeIntervalSinceNow: timeInterval];
id timer = [[[self alloc] initWithFireDate: fireDate
interval: timeInterval
repeats: repeats
block: block] autorelease];
|
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
|
repeats: repeats];
}
#ifdef OF_HAVE_BLOCKS
- (instancetype)initWithFireDate: (OFDate *)fireDate
interval: (OFTimeInterval)interval
repeats: (bool)repeats
block: (of_timer_block_t)block
{
self = [super init];
@try {
_fireDate = [fireDate retain];
_interval = interval;
_repeats = repeats;
|
|
|
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
|
repeats: repeats];
}
#ifdef OF_HAVE_BLOCKS
- (instancetype)initWithFireDate: (OFDate *)fireDate
interval: (OFTimeInterval)interval
repeats: (bool)repeats
block: (OFTimerBlock)block
{
self = [super init];
@try {
_fireDate = [fireDate retain];
_interval = interval;
_repeats = repeats;
|