mirror of
https://github.com/TomHarte/CLK.git
synced 2024-10-18 08:24:17 +00:00
Adds an additional assert.
This commit is contained in:
parent
dbd9282efc
commit
79002d6962
@ -163,6 +163,7 @@ void Drive::get_next_event(const Time &duration_already_passed) {
|
|||||||
// divide interval, which is in terms of a single rotation of the disk, by rotation speed to
|
// divide interval, which is in terms of a single rotation of the disk, by rotation speed to
|
||||||
// convert it into revolutions per second; this is achieved by multiplying by rotational_multiplier_
|
// convert it into revolutions per second; this is achieved by multiplying by rotational_multiplier_
|
||||||
assert(current_event_.length <= Time(1) && current_event_.length >= Time(0));
|
assert(current_event_.length <= Time(1) && current_event_.length >= Time(0));
|
||||||
|
assert(current_event_.length > duration_already_passed);
|
||||||
Time interval = (current_event_.length - duration_already_passed) * rotational_multiplier_;
|
Time interval = (current_event_.length - duration_already_passed) * rotational_multiplier_;
|
||||||
set_next_event_time_interval(interval);
|
set_next_event_time_interval(interval);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user