Sends a message to a target after an interval, once or repeatedly, on the application's run loop. More...
#import <Application/Application.h>


Instance Methods | |
| (BOOL) | - schedule |
| Schedules it, by attaching it to the shared application: it starts when the application runs, or straight away if it's running. More... | |
| (void) | - invalidate |
| Stops it, and detaches it from the application. More... | |
| (void) | - fire |
| Sends the message now, on the calling thread, whether or not it's scheduled, as long as it's valid. | |
| (NXDuration) | - interval |
| Returns the interval. | |
| (BOOL) | - repeats |
| Returns YES if it repeats. | |
| (BOOL) | - isValid |
| Returns YES until it's been invalidated, or has fired once if it doesn't repeat. | |
Instance Methods inherited from NXObject | |
| (void) | - dealloc |
| Frees the instance. More... | |
| (NXZone *) | - zone |
| Returns the zone in which the instance was allocated. More... | |
| (id) | - retain |
| Increases the retain count of the receiver. More... | |
| (void) | - release |
| Decreases the retain count of the receiver. More... | |
| (id) | - autorelease |
| Releases the receiver later, when the current autorelease pool of the thread is drained. More... | |
| (id) | - copy |
| Returns a copy which can't be changed by anything else, which the caller owns and has to release. More... | |
| (uintptr_t) | - hash |
| Returns a number for the object, which is the same for objects which are equal by isEqual:. More... | |
| (NXString *) | - description |
| Returns a string which describes the instance, for logging. More... | |
Instance Methods inherited from Object | |
| (id) | - init |
| Initialize the instance, after allocation. More... | |
| (Class) | - class |
| Returns the class of the instance. More... | |
| (Class) | - superclass |
| Returns the superclass of the instance. More... | |
| (BOOL) | - isEqual: |
| Compares the receiver to another object for equality. More... | |
| (BOOL) | - isKindOfClass: |
| Returns a Boolean value that indicates whether the receiver is an instance of a given class. More... | |
| (BOOL) | - conformsTo: |
| Checks if the receiver's class conforms to a protocol. More... | |
Instance Methods inherited from <ObjectProtocol> | |
| (BOOL) | - respondsToSelector: |
| Checks if the receiver responds to a selector. More... | |
Class Methods | |
| (NXTimer *) | + timerWithInterval:repeats:target:selector: |
| Returns a new timer, which isn't scheduled. More... | |
Class Methods inherited from NXObject | |
| (id) | + alloc |
| Allocates a new instance in the default zone, or if there isn't one, with sys_calloc(). More... | |
| (id) | + allocWithZone: |
| Allocates a new instance in a specific zone. More... | |
| (id) | + new |
| Allocates and initializes a new instance, as [[cls alloc] init] does. More... | |
| (NXString *) | + description |
| Returns the name of the class. | |
Class Methods inherited from Object | |
| (void) | + initialize |
| Performs one-time initialization for the class. More... | |
| (Class) | + class |
| Returns the class object. More... | |
| (Class) | + superclass |
| Returns the superclass of the class. More... | |
| (const char *) | + name |
| Returns the name of the class. More... | |
| (BOOL) | + conformsTo: |
| Checks if the class conforms to a protocol. More... | |
Additional Inherited Members | |
Protected Attributes inherited from Object | |
| Class | isa |
| A pointer to the object's class structure. More... | |
Sends a message to a target after an interval, once or repeatedly, on the application's run loop.
It's a timer of picofuse's HID, which there's a limited number of. Once scheduled, it stays attached to the application, and retained by it, until it's invalidated, or has fired once if it doesn't repeat. If there's no HID timer left when it starts, it's invalidated. The message is sent on any of the run loop's workers, so if the run loop is busy, firings of a repeating timer can be sent at the same time on different workers.
| - (void) invalidate |
Stops it, and detaches it from the application.
It doesn't fire after this, and can't be scheduled again.
| - (BOOL) schedule |
Schedules it, by attaching it to the shared application: it starts when the application runs, or straight away if it's running.
| + (NXTimer *) timerWithInterval: | (NXDuration) | interval | |
| repeats: | (BOOL) | repeats | |
| target: | (id) | target | |
| selector: | (SEL) | selector | |
Returns a new timer, which isn't scheduled.
| interval | How long before it fires, and between firings, rounded up to a millisecond. |
| repeats | YES to fire until it's invalidated, or NO to fire once. |
| target | What the message is sent to, which is retained. |
| selector | A method of the target which has the timer as its one argument, such as -tick:(NXTimer *)timer. |