blob: 6260de6c3061693c74920a9f71c6339d2384b8f2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
// Copyright 2019 yuzu emulator team
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#pragma once
#include <vector>
#include "core/hle/service/time/clock_types.h"
namespace Kernel {
class WritableEvent;
}
namespace Service::Time::Clock {
// Parts of this implementation were based on Ryujinx (https://github.com/Ryujinx/Ryujinx/pull/783).
// This code was released under public domain.
class SystemClockContextUpdateCallback {
public:
SystemClockContextUpdateCallback();
~SystemClockContextUpdateCallback();
bool NeedUpdate(const SystemClockContext& value) const;
void RegisterOperationEvent(std::shared_ptr<Kernel::WritableEvent>&& writable_event);
void BroadcastOperationEvent();
ResultCode Update(const SystemClockContext& value);
protected:
virtual ResultCode Update();
SystemClockContext context{};
private:
bool has_context{};
std::vector<std::shared_ptr<Kernel::WritableEvent>> operation_event_list;
};
} // namespace Service::Time::Clock
|