ObjFW  Diff

Differences From Artifact [b7f0bac474]:

To Artifact [2f990ddaf1]:


14
15
16
17
18
19
20
21
22




23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42


43


44
45
46
47
48
49
50
14
15
16
17
18
19
20


21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

44
45
46
47
48
49
50
51
52
53
54
55







-
-
+
+
+
+



















-
+
+

+
+







 * file.
 */

#import "OFObject.h"

@class OFTimer;
@class OFDate;
@class OFCondition;
@class OFRunLoop;
@class OFRunLoop;
#ifdef OF_THREADS
@class OFCondition;
#endif

#ifdef OF_HAVE_BLOCKS
typedef void (^of_timer_block_t)(OFTimer*);
#endif

/*!
 * @brief A class for creating and firing timers.
 */
@interface OFTimer: OFObject <OFComparing>
{
	OFDate *fireDate;
	double interval;
	id target, object1, object2;
	SEL selector;
	uint8_t arguments;
	BOOL repeats;
#ifdef OF_HAVE_BLOCKS
	of_timer_block_t block;
#endif
	BOOL isValid, done;
	BOOL isValid;
#ifdef OF_THREADS
	OFCondition *condition;
	BOOL done;
#endif
	OFRunLoop *inRunLoop;
}

#ifdef OF_HAVE_PROPERTIES
@property (retain) OFDate *fireDate;
#endif

306
307
308
309
310
311
312

313
314
315
316

317
318
319
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326







+




+



 *	  repeating timer.
 *
 * @return The time interval in which the timer will repeat, if it is a
 *	   repeating timer
 */
- (double)timeInterval;

#ifdef OF_THREADS
/*!
 * @brief Waits until the timer fired.
 */
- (void)waitUntilDone;
#endif

- (void)OF_setInRunLoop: (OFRunLoop*)inRunLoop;
@end