API  1.0.0
CPTimer Class Reference

A timer object that can send a message after the given time interval. More...

#import <CPTimer.h>

+ Inheritance diagram for CPTimer:

Instance Methods

(void) - fire
 
(CPDate- fireDate
 
(id) - initWithFireDate:interval:callback:repeats:
 
(id) - initWithFireDate:interval:invocation:repeats:
 
(id) - initWithFireDate:interval:target:selector:userInfo:repeats:
 
(void) - invalidate
 
(BOOL) - isValid
 
(void) - setFireDate:
 
(CPTimeInterval) - timeInterval
 
(id) - userInfo
 
- Instance Methods inherited from CPObject
(void) - addObserver:forKeyPath:options:context:
 
(void) - applyChange:toKeyPath:
 
(id) - autorelease
 
(id) - awakeAfterUsingCoder:
 
(void) - awakeFromCib
 
(void) - bind:toObject:withKeyPath:options:
 
(Class) - classForCoder
 
(Class) - classForKeyedArchiver
 
(CPString- className
 
(id) - copy
 
(void) - dealloc
 
(CPString- description
 
(CPDictionary- dictionaryWithValuesForKeys:
 
(void) - didChange:valuesAtIndexes:forKey:
 
(void) - didChangeValueForKey:
 
(void) - didChangeValueForKey:withSetMutation:usingObjects:
 
(void) - doesNotRecognizeSelector:
 
(CPArray) - exposedBindings
 
(id) - forwardingTargetForSelector:
 
(void) - forwardInvocation:
 
(unsigned) - hash
 
(BOOL) - implementsSelector:
 
(CPDictionary- infoForBinding:
 
(id) - init
 
(BOOL) - isEqual:
 
(BOOL) - isKindOfClass:
 
(BOOL) - isMemberOfClass:
 
(BOOL) - isProxy
 
(IMP) - methodForSelector:
 
(CPMethodSignature) - methodSignatureForSelector:
 
(id) - mutableArrayValueForKey:
 
(id) - mutableArrayValueForKeyPath:
 
(id) - mutableCopy
 
(id) - mutableSetValueForKey:
 
(id) - mutableSetValueForKeyPath:
 
(id) - performSelector:
 
(id) - performSelector:withObject:
 
(void) - performSelector:withObject:afterDelay:
 
(void) - performSelector:withObject:afterDelay:inModes:
 
(id) - performSelector:withObject:withObject:
 
(id) - performSelector:withObjects:
 
(void) - release
 
(void) - removeObserver:forKeyPath:
 
(id) - replacementObjectForArchiver:
 
(id) - replacementObjectForCoder:
 
(id) - replacementObjectForKeyedArchiver:
 
(BOOL) - respondsToSelector:
 
(id) - retain
 
(id) - self
 
(void) - setValue:forKey:
 
(void) - setValue:forKeyPath:
 
(void) - setValue:forUndefinedKey:
 
(void) - setValuesForKeysWithDictionary:
 
(CPString- UID
 
(void) - unbind:
 
(Class) - valueClassForBinding:
 
(id) - valueForKey:
 
(id) - valueForKeyPath:
 
(id) - valueForUndefinedKey:
 
(void) - willChange:valuesAtIndexes:forKey:
 
(void) - willChangeValueForKey:
 
(void) - willChangeValueForKey:withSetMutation:usingObjects:
 

Class Methods

(CPTimer+ scheduledTimerWithTimeInterval:callback:repeats:
 
(CPTimer+ scheduledTimerWithTimeInterval:invocation:repeats:
 
(CPTimer+ scheduledTimerWithTimeInterval:target:selector:userInfo:repeats:
 
(CPTimer+ timerWithTimeInterval:callback:repeats:
 
(CPTimer+ timerWithTimeInterval:invocation:repeats:
 
(CPTimer+ timerWithTimeInterval:target:selector:userInfo:repeats:
 
- Class Methods inherited from CPObject
(BOOL) + accessInstanceVariablesDirectly
 
(id) + alloc
 
(id) + allocWithCoder:
 
(BOOL) + automaticallyNotifiesObserversForKey:
 
(void) + cancelPreviousPerformRequestsWithTarget:
 
(void) + cancelPreviousPerformRequestsWithTarget:selector:object:
 
(Class) + class
 
(BOOL) + conformsToProtocol:
 
(void) + exposeBinding:
 
(void) + initialize
 
(IMP) + instanceMethodForSelector:
 
(BOOL) + instancesImplementSelector:
 
(BOOL) + instancesRespondToSelector:
 
(BOOL) + isBindingExclusive:
 
(BOOL) + isSubclassOfClass:
 
(CPSet) + keyPathsForValuesAffectingValueForKey:
 
(void) + load
 
(id) + new
 
(void) + object:performSelector:withObject:afterDelay:inModes:
 
(void) + setVersion:
 
(Class) + superclass
 
(int) + version
 

Detailed Description

A timer object that can send a message after the given time interval.

Definition at line 2 of file CPTimer.h.

Method Documentation

◆ fire()

- (void) fire
implementation

Causes the receiver’s message to be sent to its target.

Definition at line 187 of file CPTimer.j.

◆ fireDate()

- (CPDate) fireDate
implementation

Returns the date at which the receiver will fire.

Definition at line 171 of file CPTimer.j.

◆ initWithFireDate:interval:callback:repeats:()

- (id) initWithFireDate: (CPDate aDate
interval: (CPTimeInterval)  seconds
callback: (Function)  aFunction
repeats: (BOOL)  shouldRepeat 
implementation

Initializes a new CPTimer that, when added to a run loop, will fire at date and then, if repeats is YES, every seconds after that.

Definition at line 144 of file CPTimer.j.

◆ initWithFireDate:interval:invocation:repeats:()

- (id) initWithFireDate: (CPDate aDate
interval: (CPTimeInterval)  seconds
invocation: (CPInvocation anInvocation
repeats: (BOOL)  shouldRepeat 
implementation

Initializes a new CPTimer that, when added to a run loop, will fire at date and then, if repeats is YES, every seconds after that.

Definition at line 106 of file CPTimer.j.

◆ initWithFireDate:interval:target:selector:userInfo:repeats:()

- (id) initWithFireDate: (CPDate aDate
interval: (CPTimeInterval)  seconds
target: (id)  aTarget
selector: (SEL)  aSelector
userInfo: (id)  userInfo
repeats: (BOOL)  shouldRepeat 
implementation

Initializes a new CPTimer that, when added to a run loop, will fire at date and then, if repeats is YES, every seconds after that.

Definition at line 125 of file CPTimer.j.

◆ invalidate()

- (void) invalidate
implementation

Stops the receiver from ever firing again and requests its removal from its CPRunLoop object.

Definition at line 218 of file CPTimer.j.

◆ isValid()

- (BOOL) isValid
implementation

Returns a Boolean value that indicates whether the receiver is currently valid.

Definition at line 210 of file CPTimer.j.

◆ scheduledTimerWithTimeInterval:callback:repeats:()

+ (CPTimer) scheduledTimerWithTimeInterval: (CPTimeInterval)  seconds
callback: (Function)  aFunction
repeats: (BOOL)  shouldRepeat 
implementation

Returns a new CPTimer object and adds it to the current CPRunLoop object in the default mode.

Definition at line 70 of file CPTimer.j.

◆ scheduledTimerWithTimeInterval:invocation:repeats:()

+ (CPTimer) scheduledTimerWithTimeInterval: (CPTimeInterval)  seconds
invocation: (CPInvocation anInvocation
repeats: (BOOL)  shouldRepeat 
implementation

Returns a new CPTimer object and adds it to the current CPRunLoop object in the default mode.

Definition at line 46 of file CPTimer.j.

◆ scheduledTimerWithTimeInterval:target:selector:userInfo:repeats:()

+ (CPTimer) scheduledTimerWithTimeInterval: (CPTimeInterval)  seconds
target: (id)  aTarget
selector: (SEL)  aSelector
userInfo: (id)  userInfo
repeats: (BOOL)  shouldRepeat 
implementation

Returns a new CPTimer object and adds it to the current CPRunLoop object in the default mode.

Definition at line 58 of file CPTimer.j.

◆ setFireDate:()

- (void) setFireDate: (CPDate aDate
implementation

Resets the receiver to fire next at a given date.

Definition at line 179 of file CPTimer.j.

◆ timeInterval()

- (CPTimeInterval) timeInterval
implementation

Returns the receiver’s time interval.

Definition at line 163 of file CPTimer.j.

◆ timerWithTimeInterval:callback:repeats:()

+ (CPTimer) timerWithTimeInterval: (CPTimeInterval)  seconds
callback: (Function)  aFunction
repeats: (BOOL)  shouldRepeat 
implementation

Returns a new CPTimer that, when added to a run loop, will fire after seconds.

Definition at line 98 of file CPTimer.j.

◆ timerWithTimeInterval:invocation:repeats:()

+ (CPTimer) timerWithTimeInterval: (CPTimeInterval)  seconds
invocation: (CPInvocation anInvocation
repeats: (BOOL)  shouldRepeat 
implementation

Returns a new CPTimer that, when added to a run loop, will fire after seconds.

Definition at line 82 of file CPTimer.j.

◆ timerWithTimeInterval:target:selector:userInfo:repeats:()

+ (CPTimer) timerWithTimeInterval: (CPTimeInterval)  seconds
target: (id)  aTarget
selector: (SEL)  aSelector
userInfo: (id)  userInfo
repeats: (BOOL)  shouldRepeat 
implementation

Returns a new CPTimer that, when added to a run loop, will fire after seconds.

Definition at line 90 of file CPTimer.j.

◆ userInfo()

- (id) userInfo
implementation

Returns the receiver's userInfo object.

Definition at line 229 of file CPTimer.j.


The documentation for this class was generated from the following files: