2015-12-30 06:41:46 +00:00
|
|
|
#if defined(Hiro_Timer)
|
|
|
|
|
2013-03-15 13:11:33 +00:00
|
|
|
@interface CocoaTimer : NSObject {
|
|
|
|
@public
|
2015-12-30 06:41:46 +00:00
|
|
|
hiro::mTimer* timer;
|
2013-05-02 11:25:45 +00:00
|
|
|
NSTimer* instance;
|
2013-03-15 13:11:33 +00:00
|
|
|
}
|
2015-12-30 06:41:46 +00:00
|
|
|
-(id) initWith:(hiro::mTimer&)timer;
|
2013-03-15 13:11:33 +00:00
|
|
|
-(NSTimer*) instance;
|
|
|
|
-(void) update;
|
2013-03-21 12:59:01 +00:00
|
|
|
-(void) run:(NSTimer*)instance;
|
2013-03-15 13:11:33 +00:00
|
|
|
@end
|
|
|
|
|
2015-12-30 06:41:46 +00:00
|
|
|
namespace hiro {
|
2013-03-15 13:11:33 +00:00
|
|
|
|
2015-12-30 06:41:46 +00:00
|
|
|
struct pTimer : pObject {
|
|
|
|
Declare(Timer, Object)
|
2013-03-15 13:11:33 +00:00
|
|
|
|
2015-12-30 06:41:46 +00:00
|
|
|
auto setEnabled(bool enabled) -> void;
|
|
|
|
auto setInterval(uint interval) -> void;
|
2013-03-15 13:11:33 +00:00
|
|
|
|
2015-12-30 06:41:46 +00:00
|
|
|
CocoaTimer* cocoaTimer = nullptr;
|
2013-03-15 13:11:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
2015-12-30 06:41:46 +00:00
|
|
|
|
|
|
|
#endif
|