summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/k_hardware_timer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/kernel/k_hardware_timer.h')
-rw-r--r--src/core/hle/kernel/k_hardware_timer.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/hle/kernel/k_hardware_timer.h b/src/core/hle/kernel/k_hardware_timer.h
index 2c88876b3..00bef6ea1 100644
--- a/src/core/hle/kernel/k_hardware_timer.h
+++ b/src/core/hle/kernel/k_hardware_timer.h
@@ -19,10 +19,14 @@ public:
void Initialize();
void Finalize();
- s64 GetCount() {
+ s64 GetCount() const {
return GetTick();
}
+ void RegisterTask(KTimerTask* task, s64 time_from_now) {
+ this->RegisterAbsoluteTask(task, GetTick() + time_from_now);
+ }
+
void RegisterAbsoluteTask(KTimerTask* task, s64 task_time) {
KScopedDisableDispatch dd{m_kernel};
KScopedSpinLock lk{this->GetLock()};
@@ -38,7 +42,7 @@ private:
void EnableInterrupt(s64 wakeup_time);
void DisableInterrupt();
bool GetInterruptEnabled();
- s64 GetTick();
+ s64 GetTick() const;
void DoTask();
private: