@@ -18,28 +18,28 @@ #import "OFObject.h" #import "OFRunLoop.h" OF_ASSUME_NONNULL_BEGIN -/*! @file */ +/** @file */ @class OFTimer; @class OFDate; #ifdef OF_HAVE_THREADS @class OFCondition; #endif #ifdef OF_HAVE_BLOCKS -/*! +/** * @brief A block to execute when a timer fires. * * @param timer The timer which fired */ typedef void (^of_timer_block_t)(OFTimer *timer); #endif -/*! +/** * @class OFTimer OFTimer.h ObjFW/OFTimer.h * * @brief A class for creating and firing timers. */ OF_SUBCLASSING_RESTRICTED @@ -62,37 +62,37 @@ #endif OFRunLoop *_Nullable _inRunLoop; of_run_loop_mode_t _Nullable _inRunLoopMode; } -/*! +/** * @brief The time interval in which the timer will repeat, if it is a * repeating timer. */ @property (readonly, nonatomic) of_time_interval_t timeInterval; -/*! +/** * @brief Whether the timer is repeating. */ @property (readonly, nonatomic, getter=isRepeating) bool repeating; -/*! +/** * @brief Whether the timer is valid. */ @property (readonly, nonatomic, getter=isValid) bool valid; -/*! +/** * @brief The next date at which the timer will fire. * * If the timer is already scheduled in a run loop, it will be rescheduled. * Note that rescheduling is an expensive operation, though it still might be * preferable to reschedule instead of invalidating the timer and creating a * new one. */ @property (copy, nonatomic) OFDate *fireDate; -/*! +/** * @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 @@ -102,11 +102,11 @@ + (instancetype)scheduledTimerWithTimeInterval: (of_time_interval_t)timeInterval target: (id)target selector: (SEL)selector repeats: (bool)repeats; -/*! +/** * @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 @@ -118,11 +118,11 @@ target: (id)target selector: (SEL)selector object: (nullable id)object repeats: (bool)repeats; -/*! +/** * @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 @@ -138,11 +138,11 @@ selector: (SEL)selector object: (nullable id)object1 object: (nullable id)object2 repeats: (bool)repeats; -/*! +/** * @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 @@ -161,11 +161,11 @@ object: (nullable id)object1 object: (nullable id)object2 object: (nullable id)object3 repeats: (bool)repeats; -/*! +/** * @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 @@ -188,11 +188,11 @@ object: (nullable id)object3 object: (nullable id)object4 repeats: (bool)repeats; #ifdef OF_HAVE_BLOCKS -/*! +/** * @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 repeats Whether the timer repeats after it has been executed * @param block The block to invoke when the timer fires @@ -201,11 +201,11 @@ + (instancetype)scheduledTimerWithTimeInterval: (of_time_interval_t)timeInterval repeats: (bool)repeats block: (of_timer_block_t)block; #endif -/*! +/** * @brief Creates 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 @@ -215,11 +215,11 @@ + (instancetype)timerWithTimeInterval: (of_time_interval_t)timeInterval target: (id)target selector: (SEL)selector repeats: (bool)repeats; -/*! +/** * @brief Creates 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 @@ -231,11 +231,11 @@ target: (id)target selector: (SEL)selector object: (nullable id)object repeats: (bool)repeats; -/*! +/** * @brief Creates 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 @@ -251,11 +251,11 @@ selector: (SEL)selector object: (nullable id)object1 object: (nullable id)object2 repeats: (bool)repeats; -/*! +/** * @brief Creates 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 @@ -274,11 +274,11 @@ object: (nullable id)object1 object: (nullable id)object2 object: (nullable id)object3 repeats: (bool)repeats; -/*! +/** * @brief Creates 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 @@ -301,11 +301,11 @@ object: (nullable id)object3 object: (nullable id)object4 repeats: (bool)repeats; #ifdef OF_HAVE_BLOCKS -/*! +/** * @brief Creates a new timer with the specified time interval. * * @param timeInterval The time interval after which the timer should be fired * @param repeats Whether the timer repeats after it has been executed * @param block The block to invoke when the timer fires @@ -316,11 +316,11 @@ block: (of_timer_block_t)block; #endif - (instancetype)init OF_UNAVAILABLE; -/*! +/** * @brief Initializes an already allocated timer with the specified time * interval. * * @param fireDate The date at which the timer should fire * @param interval The time interval after which to repeat the timer, if it is @@ -334,11 +334,11 @@ interval: (of_time_interval_t)interval target: (id)target selector: (SEL)selector repeats: (bool)repeats; -/*! +/** * @brief Initializes an already allocated timer with the specified time * interval. * * @param fireDate The date at which the timer should fire * @param interval The time interval after which to repeat the timer, if it is @@ -354,11 +354,11 @@ target: (id)target selector: (SEL)selector object: (nullable id)object repeats: (bool)repeats; -/*! +/** * @brief Initializes an already allocated timer with the specified time * interval. * * @param fireDate The date at which the timer should fire * @param interval The time interval after which to repeat the timer, if it is @@ -378,11 +378,11 @@ selector: (SEL)selector object: (nullable id)object1 object: (nullable id)object2 repeats: (bool)repeats; -/*! +/** * @brief Initializes an already allocated timer with the specified time * interval. * * @param fireDate The date at which the timer should fire * @param interval The time interval after which to repeat the timer, if it is @@ -405,11 +405,11 @@ object: (nullable id)object1 object: (nullable id)object2 object: (nullable id)object3 repeats: (bool)repeats; -/*! +/** * @brief Initializes an already allocated timer with the specified time * interval. * * @param fireDate The date at which the timer should fire * @param interval The time interval after which to repeat the timer, if it is @@ -436,11 +436,11 @@ object: (nullable id)object3 object: (nullable id)object4 repeats: (bool)repeats; #ifdef OF_HAVE_BLOCKS -/*! +/** * @brief Initializes an already allocated timer with the specified time * interval. * * @param fireDate The date at which the timer should fire * @param interval The time interval after which to repeat the timer, if it is @@ -453,25 +453,25 @@ interval: (of_time_interval_t)interval repeats: (bool)repeats block: (of_timer_block_t)block; #endif -/*! +/** * @brief Fires the timer, meaning it will execute the specified selector on the * target. */ - (void)fire; -/*! +/** * @brief Invalidates the timer, preventing it from firing. */ - (void)invalidate; #ifdef OF_HAVE_THREADS -/*! +/** * @brief Waits until the timer fired. */ - (void)waitUntilDone; #endif @end OF_ASSUME_NONNULL_END