ObjFW  Check-in [13967106a5]

Overview
Comment:OFTimer: Add "repeating" property
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 13967106a51a35eb48f8babf1a33fe0eb33ee220bfee343d92ac4a363125f907
User & Date: js on 2017-04-02 00:43:46
Other Links: manifest | tags
Context
2017-04-02
01:06
Add OF_CONSTRUCTOR() / OF_DESTRUCTOR() check-in: d07c56a8bb user: js tags: trunk
00:43
OFTimer: Add "repeating" property check-in: 13967106a5 user: js tags: trunk
2017-03-26
16:46
ofzip: Add -C flag to change output directory check-in: 633d49030d user: js tags: trunk
Changes

Modified src/OFTimer.h from [2983f2edcb] to [6a8324c7be].

56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73










74
75
76
77
78
79
80
#ifdef OF_HAVE_THREADS
	OFCondition *_condition;
	bool _done;
#endif
	OFRunLoop *_inRunLoop;
}

/*!
 * Whether the timer is valid.
 */
@property (readonly) bool isValid;

/*!
 * The time interval in which the timer will repeat, if it is a repeating
 * timer.
 */
@property (readonly) of_time_interval_t timeInterval;











/*!
 * @brief Creates and schedules a new timer with the specified time interval.
 *
 * @param timeInterval The time interval after which the timer should be fired
 * @param target The target on which to call the selector
 * @param selector The selector to call on the target
 * @param repeats Whether the timer repeats after it has been executed







<
<
<
<
<






>
>
>
>
>
>
>
>
>
>







56
57
58
59
60
61
62





63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#ifdef OF_HAVE_THREADS
	OFCondition *_condition;
	bool _done;
#endif
	OFRunLoop *_inRunLoop;
}






/*!
 * The time interval in which the timer will repeat, if it is a repeating
 * timer.
 */
@property (readonly) of_time_interval_t timeInterval;

/*!
 * Whether the timer is repeating.
 */
@property (readonly, getter=isRepeating) bool repeating;

/*!
 * Whether the timer is valid.
 */
@property (readonly, getter=isValid) bool valid;

/*!
 * @brief Creates and schedules a new timer with the specified time interval.
 *
 * @param timeInterval The time interval after which the timer should be fired
 * @param target The target on which to call the selector
 * @param selector The selector to call on the target
 * @param repeats Whether the timer repeats after it has been executed

Modified src/OFTimer.m from [ddaebc5a1d] to [14c8339812].

28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifdef OF_HAVE_THREADS
# import "OFCondition.h"
#endif

#import "OFInvalidArgumentException.h"

@implementation OFTimer
@synthesize timeInterval = _interval, isValid = _valid;
@synthesize OF_inRunLoop = _inRunLoop;

+ (instancetype)scheduledTimerWithTimeInterval: (of_time_interval_t)timeInterval
					target: (id)target
				      selector: (SEL)selector
				       repeats: (bool)repeats
{







|







28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifdef OF_HAVE_THREADS
# import "OFCondition.h"
#endif

#import "OFInvalidArgumentException.h"

@implementation OFTimer
@synthesize timeInterval = _interval, repeating = _repeats, valid = _valid;
@synthesize OF_inRunLoop = _inRunLoop;

+ (instancetype)scheduledTimerWithTimeInterval: (of_time_interval_t)timeInterval
					target: (id)target
				      selector: (SEL)selector
				       repeats: (bool)repeats
{