summaryrefslogtreecommitdiff
path: root/Kernel/TimerQueue.h
diff options
context:
space:
mode:
authorBen Wiederhake <BenWiederhake.GitHub@gmx.de>2021-02-27 23:56:16 +0100
committerAndreas Kling <kling@serenityos.org>2021-03-02 08:36:08 +0100
commit2b6546c40a7ea7738a3bda81f57e396ab3a305ea (patch)
tree06416116c6faf30423fb074fa862a34e46139e6a /Kernel/TimerQueue.h
parent65b36e42b8dc92a2be7324b38a19956da110b7f1 (diff)
downloadserenity-2b6546c40a7ea7738a3bda81f57e396ab3a305ea.zip
Kernel: Make Thread use AK::Time internally
This commit is very invasive, because Thread likes to take a pointer and write to it. This means that translating between timespec/timeval/Time would have been more difficult than just changing everything that hands a raw pointer to Thread, in bulk.
Diffstat (limited to 'Kernel/TimerQueue.h')
-rw-r--r--Kernel/TimerQueue.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/Kernel/TimerQueue.h b/Kernel/TimerQueue.h
index 9d8f87701d..ea3b3bf88e 100644
--- a/Kernel/TimerQueue.h
+++ b/Kernel/TimerQueue.h
@@ -55,7 +55,7 @@ public:
VERIFY(!is_queued());
}
- timespec remaining() const;
+ Time remaining() const;
private:
TimerId m_id;
@@ -92,8 +92,7 @@ public:
static TimerQueue& the();
TimerId add_timer(NonnullRefPtr<Timer>&&);
- // FIXME: Should use AK::Time internally
- RefPtr<Timer> add_timer_without_id(clockid_t, const timespec&, Function<void()>&&);
+ RefPtr<Timer> add_timer_without_id(clockid_t, const Time&, Function<void()>&&);
TimerId add_timer(clockid_t, timeval& timeout, Function<void()>&& callback);
bool cancel_timer(TimerId id);
bool cancel_timer(Timer&);