summaryrefslogtreecommitdiffhomepage
path: root/dev/kernel/KernelKit/Timer.h
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-05-19 10:24:52 +0200
committerAmlal El Mahrouss <amlal@nekernel.org>2025-05-19 10:24:52 +0200
commita9653add416fbddc1969a75adb733bc9e9c675d6 (patch)
treec03a8acfd7e1f3e4ffe1407d9acd4e1d52de76b4 /dev/kernel/KernelKit/Timer.h
parentce71265ae5bd333c309dff8c2d46e4d52dd78066 (diff)
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 <amlal@nekernel.org>
Diffstat (limited to 'dev/kernel/KernelKit/Timer.h')
-rw-r--r--dev/kernel/KernelKit/Timer.h12
1 files changed, 6 insertions, 6 deletions
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