summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/kernel/timer.h22
-rw-r--r--src/yuzu/debugger/wait_tree.cpp6
2 files changed, 20 insertions, 8 deletions
diff --git a/src/core/hle/kernel/timer.h b/src/core/hle/kernel/timer.h
index 82d19cefc..c63f0ed90 100644
--- a/src/core/hle/kernel/timer.h
+++ b/src/core/hle/kernel/timer.h
@@ -32,13 +32,17 @@ public:
32 return HANDLE_TYPE; 32 return HANDLE_TYPE;
33 } 33 }
34 34
35 ResetType reset_type; ///< The ResetType of this timer 35 ResetType GetResetType() const {
36 return reset_type;
37 }
36 38
37 bool signaled; ///< Whether the timer has been signaled or not 39 u64 GetInitialDelay() const {
38 std::string name; ///< Name of timer (optional) 40 return initial_delay;
41 }
39 42
40 u64 initial_delay; ///< The delay until the timer fires for the first time 43 u64 GetIntervalDelay() const {
41 u64 interval_delay; ///< The delay until the timer fires after the first time 44 return interval_delay;
45 }
42 46
43 bool ShouldWait(Thread* thread) const override; 47 bool ShouldWait(Thread* thread) const override;
44 void Acquire(Thread* thread) override; 48 void Acquire(Thread* thread) override;
@@ -67,6 +71,14 @@ private:
67 Timer(); 71 Timer();
68 ~Timer() override; 72 ~Timer() override;
69 73
74 ResetType reset_type; ///< The ResetType of this timer
75
76 u64 initial_delay; ///< The delay until the timer fires for the first time
77 u64 interval_delay; ///< The delay until the timer fires after the first time
78
79 bool signaled; ///< Whether the timer has been signaled or not
80 std::string name; ///< Name of timer (optional)
81
70 /// Handle used as userdata to reference this object when inserting into the CoreTiming queue. 82 /// Handle used as userdata to reference this object when inserting into the CoreTiming queue.
71 Handle callback_handle; 83 Handle callback_handle;
72}; 84};
diff --git a/src/yuzu/debugger/wait_tree.cpp b/src/yuzu/debugger/wait_tree.cpp
index 2b45b8573..f5a5697a0 100644
--- a/src/yuzu/debugger/wait_tree.cpp
+++ b/src/yuzu/debugger/wait_tree.cpp
@@ -328,11 +328,11 @@ std::vector<std::unique_ptr<WaitTreeItem>> WaitTreeTimer::GetChildren() const {
328 const auto& timer = static_cast<const Kernel::Timer&>(object); 328 const auto& timer = static_cast<const Kernel::Timer&>(object);
329 329
330 list.push_back(std::make_unique<WaitTreeText>( 330 list.push_back(std::make_unique<WaitTreeText>(
331 tr("reset type = %1").arg(GetResetTypeQString(timer.reset_type)))); 331 tr("reset type = %1").arg(GetResetTypeQString(timer.GetResetType()))));
332 list.push_back( 332 list.push_back(
333 std::make_unique<WaitTreeText>(tr("initial delay = %1").arg(timer.initial_delay))); 333 std::make_unique<WaitTreeText>(tr("initial delay = %1").arg(timer.GetInitialDelay())));
334 list.push_back( 334 list.push_back(
335 std::make_unique<WaitTreeText>(tr("interval delay = %1").arg(timer.interval_delay))); 335 std::make_unique<WaitTreeText>(tr("interval delay = %1").arg(timer.GetIntervalDelay())));
336 return list; 336 return list;
337} 337}
338 338