@@ -38,11 +38,11 @@ * @brief A class for creating and firing timers. */ @interface OFTimer: OFObject { OFDate *_fireDate; - double _interval; + of_time_interval_t _interval; id _target, _object1, _object2; SEL _selector; uint8_t _arguments; bool _repeats; #ifdef OF_HAVE_BLOCKS @@ -61,54 +61,51 @@ #endif /*! * @brief Creates and schedules a new timer with the specified time interval. * - * @param interval The time interval after which the timer should be executed - * when fired + * @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 * @return A new, autoreleased timer */ -+ (instancetype)scheduledTimerWithTimeInterval: (double)interval ++ (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 interval The time interval after which the timer should be executed - * when fired + * @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 object An object to pass when calling the selector on the target * @param repeats Whether the timer repeats after it has been executed * @return A new, autoreleased timer */ -+ (instancetype)scheduledTimerWithTimeInterval: (double)interval ++ (instancetype)scheduledTimerWithTimeInterval: (of_time_interval_t)timeInterval target: (id)target selector: (SEL)selector object: (id)object repeats: (bool)repeats; /*! * @brief Creates and schedules a new timer with the specified time interval. * - * @param interval The time interval after which the timer should be executed - * when fired + * @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 object1 The first object to pass when calling the selector on the * target * @param object2 The second object to pass when calling the selector on the * target * @param repeats Whether the timer repeats after it has been executed * @return A new, autoreleased timer */ -+ (instancetype)scheduledTimerWithTimeInterval: (double)interval ++ (instancetype)scheduledTimerWithTimeInterval: (of_time_interval_t)timeInterval target: (id)target selector: (SEL)selector object: (id)object1 object: (id)object2 repeats: (bool)repeats; @@ -115,68 +112,64 @@ #ifdef OF_HAVE_BLOCKS /*! * @brief Creates and schedules a new timer with the specified time interval. * - * @param interval The time interval after which the timer should be executed - * when fired + * @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 * @return A new, autoreleased timer */ -+ (instancetype)scheduledTimerWithTimeInterval: (double)interval ++ (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 interval The time interval after which the timer should be executed - * when fired + * @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 * @return A new, autoreleased timer */ -+ (instancetype)timerWithTimeInterval: (double)interval ++ (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 interval The time interval after which the timer should be executed - * when fired + * @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 object An object to pass when calling the selector on the target * @param repeats Whether the timer repeats after it has been executed * @return A new, autoreleased timer */ -+ (instancetype)timerWithTimeInterval: (double)interval ++ (instancetype)timerWithTimeInterval: (of_time_interval_t)timeInterval target: (id)target selector: (SEL)selector object: (id)object repeats: (bool)repeats; /*! * @brief Creates a new timer with the specified time interval. * - * @param interval The time interval after which the timer should be executed - * when fired + * @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 object1 The first object to pass when calling the selector on the * target * @param object2 The second object to pass when calling the selector on the * target * @param repeats Whether the timer repeats after it has been executed * @return A new, autoreleased timer */ -+ (instancetype)timerWithTimeInterval: (double)interval ++ (instancetype)timerWithTimeInterval: (of_time_interval_t)timeInterval target: (id)target selector: (SEL)selector object: (id)object1 object: (id)object2 repeats: (bool)repeats; @@ -183,17 +176,16 @@ #ifdef OF_HAVE_BLOCKS /*! * @brief Creates a new timer with the specified time interval. * - * @param interval The time interval after which the timer should be executed - * when fired + * @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 * @return A new, autoreleased timer */ -+ (instancetype)timerWithTimeInterval: (double)interval ++ (instancetype)timerWithTimeInterval: (of_time_interval_t)timeInterval repeats: (bool)repeats block: (of_timer_block_t)block; #endif /*! @@ -207,11 +199,11 @@ * @param selector The selector to call on the target * @param repeats Whether the timer repeats after it has been executed * @return An initialized timer */ - initWithFireDate: (OFDate*)fireDate - interval: (double)interval + interval: (of_time_interval_t)interval target: (id)target selector: (SEL)selector repeats: (bool)repeats; /*! @@ -226,11 +218,11 @@ * @param object An object to pass when calling the selector on the target * @param repeats Whether the timer repeats after it has been executed * @return An initialized timer */ - initWithFireDate: (OFDate*)fireDate - interval: (double)interval + interval: (of_time_interval_t)interval target: (id)target selector: (SEL)selector object: (id)object repeats: (bool)repeats; @@ -249,11 +241,11 @@ * target * @param repeats Whether the timer repeats after it has been executed * @return An initialized timer */ - initWithFireDate: (OFDate*)fireDate - interval: (double)interval + interval: (of_time_interval_t)interval target: (id)target selector: (SEL)selector object: (id)object1 object: (id)object2 repeats: (bool)repeats; @@ -269,11 +261,11 @@ * @param repeats Whether the timer repeats after it has been executed * @param block The block to invoke when the timer fires * @return An initialized timer */ - initWithFireDate: (OFDate*)fireDate - interval: (double)interval + interval: (of_time_interval_t)interval repeats: (bool)repeats block: (of_timer_block_t)block; #endif /*! @@ -318,14 +310,14 @@ * repeating timer. * * @return The time interval in which the timer will repeat, if it is a * repeating timer */ -- (double)timeInterval; +- (of_time_interval_t)timeInterval; #ifdef OF_HAVE_THREADS /*! * @brief Waits until the timer fired. */ - (void)waitUntilDone; #endif @end