1
0
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:
Thomas Harte 2017-09-11 22:24:24 -04:00
parent 42616da7ff
commit 9ac831b09c

View File

@ -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() {