mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-23 20:29:42 +00:00
Added an additional protection against overflow.
This commit is contained in:
parent
42616da7ff
commit
9ac831b09c
@ -84,6 +84,7 @@ void TimedEventLoop::set_next_event_time_interval(Time interval) {
|
||||
assert(cycles_until_event_ >= 0);
|
||||
subcycles_until_event_.length = (unsigned int)(numerator % denominator);
|
||||
subcycles_until_event_.clock_rate = (unsigned int)denominator;
|
||||
subcycles_until_event_.simplify();
|
||||
}
|
||||
|
||||
Time TimedEventLoop::get_time_into_next_event() {
|
||||
|
Loading…
Reference in New Issue
Block a user