mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
Kernel: Add TimeManagement::is_initialized()
This allows clients to check whether TimeManagement is available before trying to ask it about time related things.
This commit is contained in:
parent
bf88adbcb6
commit
0592f80186
Notes:
sideshowbarker
2024-07-18 05:37:06 +09:00
Author: https://github.com/awesomekling
Commit: 0592f80186
2 changed files with 6 additions and 0 deletions
|
@ -27,6 +27,11 @@ namespace Kernel {
|
||||||
|
|
||||||
static Singleton<TimeManagement> s_the;
|
static Singleton<TimeManagement> s_the;
|
||||||
|
|
||||||
|
bool TimeManagement::is_initialized()
|
||||||
|
{
|
||||||
|
return s_the.is_initialized();
|
||||||
|
}
|
||||||
|
|
||||||
TimeManagement& TimeManagement::the()
|
TimeManagement& TimeManagement::the()
|
||||||
{
|
{
|
||||||
return *s_the;
|
return *s_the;
|
||||||
|
|
|
@ -34,6 +34,7 @@ class TimeManagement {
|
||||||
public:
|
public:
|
||||||
TimeManagement();
|
TimeManagement();
|
||||||
static void initialize(u32 cpu);
|
static void initialize(u32 cpu);
|
||||||
|
static bool is_initialized();
|
||||||
static TimeManagement& the();
|
static TimeManagement& the();
|
||||||
|
|
||||||
static bool is_valid_clock_id(clockid_t);
|
static bool is_valid_clock_id(clockid_t);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue