summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/time/network_system_clock_context_writer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/service/time/network_system_clock_context_writer.h')
-rw-r--r--src/core/hle/service/time/network_system_clock_context_writer.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/core/hle/service/time/network_system_clock_context_writer.h b/src/core/hle/service/time/network_system_clock_context_writer.h
new file mode 100644
index 000000000..94d8788ff
--- /dev/null
+++ b/src/core/hle/service/time/network_system_clock_context_writer.h
@@ -0,0 +1,28 @@
+// Copyright 2019 yuzu emulator team
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#pragma once
+
+#include "core/hle/service/time/errors.h"
+#include "core/hle/service/time/system_clock_context_update_callback.h"
+#include "core/hle/service/time/time_sharedmemory.h"
+
+namespace Service::Time::Clock {
+
+class NetworkSystemClockContextWriter final : public SystemClockContextUpdateCallback {
+public:
+ explicit NetworkSystemClockContextWriter(SharedMemory& shared_memory)
+ : SystemClockContextUpdateCallback{}, shared_memory{shared_memory} {}
+
+protected:
+ ResultCode Update() override {
+ shared_memory.UpdateNetworkSystemClockContext(context);
+ return RESULT_SUCCESS;
+ }
+
+private:
+ SharedMemory& shared_memory;
+};
+
+} // namespace Service::Time::Clock