1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-04-20 10:17:05 +00:00

Converted the TimedEventLoop and the things that sit atop it into ClockReceivers.

This commit is contained in:
Thomas Harte
2017-07-24 21:19:05 -04:00
parent 9bff787ee1
commit 8a2bdb8d22
16 changed files with 37 additions and 33 deletions
+2 -2
View File
@@ -15,8 +15,8 @@ using namespace Storage;
TimedEventLoop::TimedEventLoop(unsigned int input_clock_rate) :
input_clock_rate_(input_clock_rate) {}
void TimedEventLoop::run_for_cycles(int number_of_cycles) {
cycles_until_event_ -= number_of_cycles;
void TimedEventLoop::run_for(const Cycles &cycles) {
cycles_until_event_ -= cycles.as_int();
while(cycles_until_event_ <= 0) {
process_next_event();
}