mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-26 15:32:04 +00:00
Avoid confusing temporary storage.
This commit is contained in:
parent
33e2a4b21c
commit
7a673a2448
@ -323,8 +323,10 @@ Cycles TimedInterruptSource::get_next_sequence_point() const {
|
||||
const auto &channel = channels_[int(rate_) - int(InterruptRate::ToneGenerator0)];
|
||||
const int cycles_until_interrupt = channel.value + 1 + (!channel.level) * (channel.reload + 1);
|
||||
|
||||
int result = 250'000 - (two_second_counter_ % 250'000);
|
||||
return Cycles(std::min(result, cycles_until_interrupt));
|
||||
return Cycles(std::min(
|
||||
250'000 - (two_second_counter_ % 250'000),
|
||||
cycles_until_interrupt
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user