summaryrefslogtreecommitdiff
path: root/Kernel/Thread.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-11-22 17:20:58 +0100
committerAndreas Kling <kling@serenityos.org>2020-11-22 17:20:58 +0100
commit94ff04b5361cba26b76be7caff1c3edb30b22dd3 (patch)
tree77558f1364b557cb1027b56ce942a941c63f6c89 /Kernel/Thread.h
parente07d14f4d93c8eb4fc6896b866d36aa8303d6170 (diff)
downloadserenity-94ff04b5361cba26b76be7caff1c3edb30b22dd3.zip
Kernel: Make CLOCK_MONOTONIC respect the system tick frequency
The time returned by sys$clock_gettime() was not aligned with the delay calculations in sys$clock_nanosleep(). This patch fixes that by taking the system's ticks_per_second value into account in both functions. This patch also removes the need for Thread::sleep_until() and uses Thread::sleep() for both absolute and relative sleeps. This was causing the nesalizer emulator port to sleep for a negative amount of time at the end of each frame, making it run way too fast.
Diffstat (limited to 'Kernel/Thread.h')
-rw-r--r--Kernel/Thread.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/Kernel/Thread.h b/Kernel/Thread.h
index 2c482e1f74..96dc5b2aa2 100644
--- a/Kernel/Thread.h
+++ b/Kernel/Thread.h
@@ -377,7 +377,6 @@ public:
size_t thread_specific_region_size() const { return m_thread_specific_region_size; }
u64 sleep(u64 ticks);
- u64 sleep_until(u64 wakeup_time);
class BlockResult {
public: