summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/time/standard_user_system_clock_core.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/time/standard_user_system_clock_core.cpp33
1 files changed, 16 insertions, 17 deletions
diff --git a/src/core/hle/service/time/standard_user_system_clock_core.cpp b/src/core/hle/service/time/standard_user_system_clock_core.cpp
index b9faa474e..41bc01abd 100644
--- a/src/core/hle/service/time/standard_user_system_clock_core.cpp
+++ b/src/core/hle/service/time/standard_user_system_clock_core.cpp
@@ -4,7 +4,6 @@
#include "common/assert.h"
#include "core/core.h"
-#include "core/hle/kernel/k_event.h"
#include "core/hle/service/time/standard_local_system_clock_core.h"
#include "core/hle/service/time/standard_network_system_clock_core.h"
#include "core/hle/service/time/standard_user_system_clock_core.h"
@@ -12,15 +11,15 @@
namespace Service::Time::Clock {
StandardUserSystemClockCore::StandardUserSystemClockCore(
- StandardLocalSystemClockCore& local_system_clock_core,
- StandardNetworkSystemClockCore& network_system_clock_core, Core::System& system)
- : SystemClockCore(local_system_clock_core.GetSteadyClockCore()),
- local_system_clock_core{local_system_clock_core},
- network_system_clock_core{network_system_clock_core}, auto_correction_enabled{},
- auto_correction_time{SteadyClockTimePoint::GetRandom()},
- auto_correction_event{Kernel::KEvent::Create(
- system.Kernel(), "StandardUserSystemClockCore:AutoCorrectionEvent")} {
- auto_correction_event->Initialize();
+ StandardLocalSystemClockCore& local_system_clock_core_,
+ StandardNetworkSystemClockCore& network_system_clock_core_, Core::System& system_)
+ : SystemClockCore(local_system_clock_core_.GetSteadyClockCore()),
+ local_system_clock_core{local_system_clock_core_},
+ network_system_clock_core{network_system_clock_core_},
+ auto_correction_time{SteadyClockTimePoint::GetRandom()}, auto_correction_event{
+ system_.Kernel()} {
+ Kernel::KAutoObject::Create(std::addressof(auto_correction_event));
+ auto_correction_event.Initialize("StandardUserSystemClockCore:AutoCorrectionEvent");
}
ResultCode StandardUserSystemClockCore::SetAutomaticCorrectionEnabled(Core::System& system,
@@ -36,21 +35,21 @@ ResultCode StandardUserSystemClockCore::SetAutomaticCorrectionEnabled(Core::Syst
}
ResultCode StandardUserSystemClockCore::GetClockContext(Core::System& system,
- SystemClockContext& context) const {
+ SystemClockContext& ctx) const {
if (const ResultCode result{ApplyAutomaticCorrection(system, false)};
result != RESULT_SUCCESS) {
return result;
}
- return local_system_clock_core.GetClockContext(system, context);
+ return local_system_clock_core.GetClockContext(system, ctx);
}
-ResultCode StandardUserSystemClockCore::Flush(const SystemClockContext& context) {
+ResultCode StandardUserSystemClockCore::Flush(const SystemClockContext&) {
UNREACHABLE();
return ERROR_NOT_IMPLEMENTED;
}
-ResultCode StandardUserSystemClockCore::SetClockContext(const SystemClockContext& context) {
+ResultCode StandardUserSystemClockCore::SetClockContext(const SystemClockContext&) {
UNREACHABLE();
return ERROR_NOT_IMPLEMENTED;
}
@@ -65,13 +64,13 @@ ResultCode StandardUserSystemClockCore::ApplyAutomaticCorrection(Core::System& s
return ERROR_UNINITIALIZED_CLOCK;
}
- SystemClockContext context{};
- if (const ResultCode result{network_system_clock_core.GetClockContext(system, context)};
+ SystemClockContext ctx{};
+ if (const ResultCode result{network_system_clock_core.GetClockContext(system, ctx)};
result != RESULT_SUCCESS) {
return result;
}
- local_system_clock_core.SetClockContext(context);
+ local_system_clock_core.SetClockContext(ctx);
return RESULT_SUCCESS;
}