mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:37:46 +00:00
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.
This commit is contained in:
parent
e07d14f4d9
commit
94ff04b536
3 changed files with 18 additions and 27 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue