mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-05 01:42:54 +00:00
Kernel: Simplify the Time management initialization
This commit is contained in:
parent
8e336798b5
commit
a7c5a1fe69
Notes:
sideshowbarker
2024-07-19 07:46:24 +09:00
Author: https://github.com/supercomputer7
Commit: a7c5a1fe69
Pull-request: https://github.com/SerenityOS/serenity/pull/1715
3 changed files with 7 additions and 25 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue