1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-05 10:28:58 +00:00

Ensures cycles_per_revolution_ is populated for fixed-rate drives.

This commit is contained in:
Thomas Harte 2019-09-28 23:23:15 -04:00
parent 4ac3839185
commit 9d17d48bca

View File

@ -20,8 +20,8 @@ using namespace Storage::Disk;
Drive::Drive(int input_clock_rate, int revolutions_per_minute, int number_of_heads):
Storage::TimedEventLoop(input_clock_rate),
rotational_multiplier_(60.0f / float(revolutions_per_minute)),
available_heads_(number_of_heads) {
set_rotation_speed(revolutions_per_minute);
const auto seed = static_cast<std::default_random_engine::result_type>(std::chrono::system_clock::now().time_since_epoch().count());
std::default_random_engine randomiser(seed);