Codechange: Don't keep autosave_interval in std::chrono::minutes.

This variable is saved as a setting which requires the variable type to be known, but std::chrono::minutes may vary depending on system type.

Instead, keep as uint32_t and convert to std::chrono::minutes only when setting the timer.
This commit is contained in:
Peter Nelson
2023-12-07 19:27:00 +00:00
committed by Peter Nelson
parent a29766d6cc
commit 54d45a6047
4 changed files with 13 additions and 13 deletions

View File

@@ -1475,7 +1475,7 @@ static IntervalTimer<TimerGameRealtime> _autosave_interval({std::chrono::millise
*/
void ChangeAutosaveFrequency(bool reset)
{
_autosave_interval.SetInterval({_settings_client.gui.autosave_interval, TimerGameRealtime::AUTOSAVE}, reset);
_autosave_interval.SetInterval({std::chrono::minutes(_settings_client.gui.autosave_interval), TimerGameRealtime::AUTOSAVE}, reset);
}
/**