picofuse-objc

NXTimer.h
Go to the documentation of this file.
1 
5 #pragma once
6 #include "NXEventSource.h"
8 
23 @interface NXTimer : NXObject <NXEventSource> {
24 @private
25  NXDuration _interval;
26  BOOL _repeats;
27  id _target;
28  SEL _selector;
29  void *_device;
30  uintptr_t _attachment;
31  BOOL _valid;
32 }
33 
45 + (NXTimer *)timerWithInterval:(NXDuration)interval
47  target:(id)target
48  selector:(SEL)selector;
49 
55 - (BOOL)schedule;
56 
61 - (void)invalidate;
62 
67 - (void)fire;
68 
73 
77 - (BOOL)repeats;
78 
82 - (BOOL)isValid;
83 
84 @end
NXDuration interval()
Returns the interval.
int64_t NXDuration
A length of time, in nanoseconds, which may be negative.
Definition: NXDuration.h:17
Foundation framework header.
void invalidate()
Stops it, and detaches it from the application.
Something which produces events, such as a timer, while it&#39;s attached to the application with -[NXApp...
Definition: NXEventSource.h:17
Sends a message to a target after an interval, once or repeatedly, on the application&#39;s run loop...
Definition: NXTimer.h:23
Defines the NXEventSource protocol, for what produces events for an application.
void fire()
Sends the message now, on the calling thread, whether or not it&#39;s scheduled, as long as it&#39;s valid...
BOOL repeats()
Returns YES if it repeats.
bool BOOL
A Boolean value.
Definition: runtime.h:60
The base class for objects in the Foundation framework.
Definition: NXObject.h:28
const struct objc_selector * SEL
A pointer to a method selector.
Definition: runtime.h:23
BOOL isValid()
Returns YES until it&#39;s been invalidated, or has fired once if it doesn&#39;t repeat.
BOOL schedule()
Schedules it, by attaching it to the shared application: it starts when the application runs...