mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:28:12 +00:00
Everywhere: Use MonotonicTime instead of Duration
This is easily identifiable by anyone who uses Duration::now_monotonic, and any downstream users of that data.
This commit is contained in:
parent
b2e7b8cdff
commit
fc5cab5c21
29 changed files with 79 additions and 80 deletions
|
@ -25,9 +25,9 @@ namespace Kernel {
|
|||
|
||||
static void delay(i64 nanoseconds)
|
||||
{
|
||||
auto start = TimeManagement::the().monotonic_time().to_nanoseconds();
|
||||
auto end = start + nanoseconds;
|
||||
while (TimeManagement::the().monotonic_time().to_nanoseconds() < end)
|
||||
auto start = TimeManagement::the().monotonic_time();
|
||||
auto end = start + Duration::from_nanoseconds(nanoseconds);
|
||||
while (TimeManagement::the().monotonic_time() < end)
|
||||
Processor::pause();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue