mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-07-17 10:11:43 +00:00
Perform CPU sleep when using Sleep() function
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user