mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-28 07:24:37 +00:00
Perform CPU sleep when using Sleep() function
This commit is contained in:
parent
a5fdf14f0d
commit
4af2b199f4
@ -17,7 +17,7 @@ namespace Time
|
|||||||
#if defined(__amd64__) || defined(__i386__)
|
#if defined(__amd64__) || defined(__i386__)
|
||||||
uint64_t Target = mminq(&((HPET *)hpet)->MainCounterValue) + (Milliseconds * 1000000000) / clk;
|
uint64_t Target = mminq(&((HPET *)hpet)->MainCounterValue) + (Milliseconds * 1000000000) / clk;
|
||||||
while (mminq(&((HPET *)hpet)->MainCounterValue) < Target)
|
while (mminq(&((HPET *)hpet)->MainCounterValue) < Target)
|
||||||
;
|
CPU::Pause();
|
||||||
#elif defined(__aarch64__)
|
#elif defined(__aarch64__)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user