The function should only allow false values to be set to true, and should be judged externally. Otherwise we can call this function to cancel the delay to cheat in Project 1 LeaderBoard(2023 fall). Here is an example:
auto *disk_manager_memory = dynamic_cast<DiskManagerUnlimitedMemory *>(disk_manager_);
if (disk_manager_memory != nullptr) {
disk_manager_memory->EnableLatencySimulator(false);
}
The function should only allow false values to be set to true, and should be judged externally. Otherwise we can call this function to cancel the delay to cheat in Project 1 LeaderBoard(2023 fall). Here is an example: