mirror of
https://git.citron-emu.org/citron/emulator
synced 2025-12-20 19:13:56 +00:00
CoreTiming: Reworked CoreTiming (cherry-picked from Citra #3119)
* CoreTiming: New CoreTiming; Add Test for CoreTiming
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
namespace Kernel {
|
||||
|
||||
/// Event type for the thread wake up event
|
||||
static int ThreadWakeupEventType;
|
||||
static CoreTiming::EventType* ThreadWakeupEventType = nullptr;
|
||||
|
||||
bool Thread::ShouldWait(Thread* thread) const {
|
||||
return status != THREADSTATUS_DEAD;
|
||||
@@ -265,8 +265,7 @@ void Thread::WakeAfterDelay(s64 nanoseconds) {
|
||||
if (nanoseconds == -1)
|
||||
return;
|
||||
|
||||
u64 microseconds = nanoseconds / 1000;
|
||||
CoreTiming::ScheduleEvent(usToCycles(microseconds), ThreadWakeupEventType, callback_handle);
|
||||
CoreTiming::ScheduleEvent(nsToCycles(nanoseconds), ThreadWakeupEventType, callback_handle);
|
||||
}
|
||||
|
||||
void Thread::ResumeFromWait() {
|
||||
|
||||
Reference in New Issue
Block a user