From ef101c1852301f828531ee1e2217fc64bf26bd12 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Fri, 14 Mar 2025 21:42:49 +0100 Subject: Kernel: Patch UserProcess::Delete, and AHCI identify command. Signed-off-by: Amlal El Mahrouss --- dev/Kernel/KernelKit/Timer.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'dev/Kernel/KernelKit/Timer.h') diff --git a/dev/Kernel/KernelKit/Timer.h b/dev/Kernel/KernelKit/Timer.h index 6328c1a1..abca5352 100644 --- a/dev/Kernel/KernelKit/Timer.h +++ b/dev/Kernel/KernelKit/Timer.h @@ -14,6 +14,8 @@ namespace NeOS class SoftwareTimer; class TimerInterface; + inline constexpr Int16 kTimeUnit = 1000; + class TimerInterface { public: @@ -62,20 +64,20 @@ namespace NeOS Int64 fWaitFor{0}; }; - inline Int64 Milliseconds(Int64 time) + inline Int64 rtl_ms(Int64 time) { if (time < 0) return 0; // TODO: nanoseconds maybe? - return 1000 * 1000 * time; + return kTimeUnit * kTimeUnit * time; } - inline Int64 Seconds(Int64 time) + inline Int64 rtl_seconds(Int64 time) { if (time < 0) return 0; - return 1000 * Milliseconds(time); + return kTimeUnit * rtl_ms(time); } } // namespace NeOS -- cgit v1.2.3