mirror of https://github.com/bsnes-emu/bsnes.git
27 lines
488 B
C++
27 lines
488 B
C++
|
@interface CocoaTimer : NSObject {
|
||
|
@public
|
||
|
phoenix::Timer *timer;
|
||
|
NSTimer *instance;
|
||
|
}
|
||
|
-(id) initWith :(phoenix::Timer&)timer;
|
||
|
-(NSTimer*) instance;
|
||
|
-(void) update;
|
||
|
-(void) run :(NSTimer*)instance;
|
||
|
@end
|
||
|
|
||
|
namespace phoenix {
|
||
|
|
||
|
struct pTimer : public pObject {
|
||
|
Timer &timer;
|
||
|
CocoaTimer *cocoaTimer;
|
||
|
|
||
|
void setEnabled(bool enabled);
|
||
|
void setInterval(unsigned milliseconds);
|
||
|
|
||
|
pTimer(Timer &timer) : pObject(timer), timer(timer) {}
|
||
|
void constructor();
|
||
|
void destructor();
|
||
|
};
|
||
|
|
||
|
}
|