From a9653add416fbddc1969a75adb733bc9e9c675d6 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Mon, 19 May 2025 10:24:52 +0200 Subject: feat(kernel, sched): Architectural improvements, and cleaned up the codebase from previous implementations that didn't work/scale well. Signed-off-by: Amlal El Mahrouss --- dev/kernel/KernelKit/Timer.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'dev/kernel/KernelKit/Timer.h') diff --git a/dev/kernel/KernelKit/Timer.h b/dev/kernel/KernelKit/Timer.h index d6cfee39..2d040535 100644 --- a/dev/kernel/KernelKit/Timer.h +++ b/dev/kernel/KernelKit/Timer.h @@ -60,16 +60,16 @@ class HardwareTimer final : public TimerInterface { Int64 fWaitFor{0}; }; -inline Int64 rtl_microseconds(Int64 time) { - if (time < 0) return 0; +inline UInt64 rtl_microseconds(UInt64 time) { + if (time < 1) return 0; // TODO: nanoseconds maybe? - return kTimeUnit * time; + return time / kTimeUnit; } -inline Int64 rtl_milliseconds(Int64 time) { - if (time < 0) return 0; +inline UInt64 rtl_milliseconds(UInt64 time) { + if (time < 1) return 0; - return kTimeUnit * kTimeUnit * time; + return time; } } // namespace Kernel -- cgit v1.2.3