diff options
Diffstat (limited to 'src/core/hle/kernel/timer.h')
| -rw-r--r-- | src/core/hle/kernel/timer.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/core/hle/kernel/timer.h b/src/core/hle/kernel/timer.h index 4dddc67e0..12915c1b1 100644 --- a/src/core/hle/kernel/timer.h +++ b/src/core/hle/kernel/timer.h | |||
| @@ -10,15 +10,19 @@ | |||
| 10 | 10 | ||
| 11 | namespace Kernel { | 11 | namespace Kernel { |
| 12 | 12 | ||
| 13 | class KernelCore; | ||
| 14 | |||
| 13 | class Timer final : public WaitObject { | 15 | class Timer final : public WaitObject { |
| 14 | public: | 16 | public: |
| 15 | /** | 17 | /** |
| 16 | * Creates a timer | 18 | * Creates a timer |
| 19 | * @param kernel The kernel instance to create the timer callback handle for. | ||
| 17 | * @param reset_type ResetType describing how to create the timer | 20 | * @param reset_type ResetType describing how to create the timer |
| 18 | * @param name Optional name of timer | 21 | * @param name Optional name of timer |
| 19 | * @return The created Timer | 22 | * @return The created Timer |
| 20 | */ | 23 | */ |
| 21 | static SharedPtr<Timer> Create(ResetType reset_type, std::string name = "Unknown"); | 24 | static SharedPtr<Timer> Create(KernelCore& kernel, ResetType reset_type, |
| 25 | std::string name = "Unknown"); | ||
| 22 | 26 | ||
| 23 | std::string GetTypeName() const override { | 27 | std::string GetTypeName() const override { |
| 24 | return "Timer"; | 28 | return "Timer"; |
| @@ -68,7 +72,7 @@ public: | |||
| 68 | void Signal(int cycles_late); | 72 | void Signal(int cycles_late); |
| 69 | 73 | ||
| 70 | private: | 74 | private: |
| 71 | Timer(); | 75 | explicit Timer(KernelCore& kernel); |
| 72 | ~Timer() override; | 76 | ~Timer() override; |
| 73 | 77 | ||
| 74 | ResetType reset_type; ///< The ResetType of this timer | 78 | ResetType reset_type; ///< The ResetType of this timer |
| @@ -83,9 +87,4 @@ private: | |||
| 83 | Handle callback_handle; | 87 | Handle callback_handle; |
| 84 | }; | 88 | }; |
| 85 | 89 | ||
| 86 | /// Initializes the required variables for timers | ||
| 87 | void TimersInit(); | ||
| 88 | /// Tears down the timer variables | ||
| 89 | void TimersShutdown(); | ||
| 90 | |||
| 91 | } // namespace Kernel | 90 | } // namespace Kernel |