1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 21:25:07 +00:00

Kernel: Simplify the Time management initialization

This commit is contained in:
Liav A 2020-04-09 20:29:06 +03:00 committed by Andreas Kling
parent 8e336798b5
commit a7c5a1fe69
3 changed files with 7 additions and 25 deletions

View file

@ -62,10 +62,13 @@ time_t TimeManagement::epoch_time() const
return m_epoch_time;
}
void TimeManagement::initialize(bool probe_non_legacy_hardware_timers)
void TimeManagement::initialize()
{
ASSERT(!TimeManagement::initialized());
s_time_management = new TimeManagement(probe_non_legacy_hardware_timers);
if (kernel_command_line().lookup("time").value_or("modern") == "legacy")
s_time_management = new TimeManagement(false);
else
s_time_management = new TimeManagement(true);
}
time_t TimeManagement::seconds_since_boot() const
{