summaryrefslogtreecommitdiffhomepage
path: root/dev/Kernel/KernelKit/Timer.h
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2025-03-14 21:42:49 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2025-03-14 21:42:49 +0100
commitef101c1852301f828531ee1e2217fc64bf26bd12 (patch)
tree1d0d82c97ca84b77ba3d3d238899b1d38d08a25d /dev/Kernel/KernelKit/Timer.h
parent57e99bd9a0adac271b5cf1fd9b426b6b4eb8ebee (diff)
Kernel: Patch UserProcess::Delete, and AHCI identify command.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/Kernel/KernelKit/Timer.h')
-rw-r--r--dev/Kernel/KernelKit/Timer.h10
1 files changed, 6 insertions, 4 deletions
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