mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-16 18:30:32 +00:00
Pulls out ticks as a macro constant.
For playing.
This commit is contained in:
parent
96769c52f6
commit
01fd1b1a2e
@ -717,11 +717,13 @@ struct ActivityObserver: public Activity::Observer {
|
||||
} flushDrawable:YES];
|
||||
}
|
||||
|
||||
#define TICKS 600
|
||||
|
||||
- (void)start {
|
||||
_timer = [[CSHighPrecisionTimer alloc] initWithTask:^{
|
||||
CGSize pixelSize;
|
||||
@synchronized(self) {
|
||||
self->_machine->crt_machine()->run_for(2500000.0 / 1000000000.0);
|
||||
self->_machine->crt_machine()->run_for(1.0 / double(TICKS));
|
||||
pixelSize = self->_pixelSize;
|
||||
}
|
||||
|
||||
@ -733,9 +735,11 @@ struct ActivityObserver: public Activity::Observer {
|
||||
self->is_updating.clear();
|
||||
});
|
||||
}
|
||||
} interval:2500000];
|
||||
} interval:uint64_t(1000000000) / uint64_t(TICKS)];
|
||||
}
|
||||
|
||||
#undef TICKS
|
||||
|
||||
- (void)stop {
|
||||
[_timer invalidate];
|
||||
_timer = nil;
|
||||
|
Loading…
x
Reference in New Issue
Block a user