-
Notifications
You must be signed in to change notification settings - Fork 0
/
SMTimer.h
31 lines (25 loc) · 846 Bytes
/
SMTimer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#import "jsapi.h"
@interface SMTimer : NSObject {
@private
jsval callback_;
JSContext* jsContext_;
NSTimer* timer_;
NSTimeInterval interval_;
BOOL repeats_;
}
@property (nonatomic, assign) jsval callback;
@property (nonatomic, assign) JSContext* jsContext;
@property (nonatomic, retain) NSTimer* timer;
@property (nonatomic, assign) NSTimeInterval interval;
@property (nonatomic, assign) BOOL repeats;
+ (id)registeredTimerWithCallback:(jsval)callback
jsContext:(JSContext*)jsContext
interval:(NSTimeInterval)interval
repeats:(BOOL)repeats;
- (id)initWithCallback:(jsval)callback
jsContext:(JSContext*)jsContext
interval:(NSTimeInterval)interval
repeats:(BOOL)repeats;
- (void)register;
- (void)unregister;
@end