Fixing misuse of std::chrono.
This commit is contained in:
parent
2820ff85e5
commit
ad090a40eb
|
@ -143,7 +143,7 @@ void AudioSystem::WorkerThreadMain() {
|
|||
|
||||
if (!pumped) {
|
||||
SCOPE_profile_cpu_i("apu", "Sleep");
|
||||
xe::threading::Sleep(std::chrono::milliseconds::duration(500));
|
||||
xe::threading::Sleep(std::chrono::milliseconds(500));
|
||||
}
|
||||
}
|
||||
worker_running_ = false;
|
||||
|
|
|
@ -1104,8 +1104,7 @@ bool CommandProcessor::ExecutePacketType3_WAIT_REG_MEM(RingbufferReader* reader,
|
|||
// User wants it fast and dangerous.
|
||||
xe::threading::MaybeYield();
|
||||
} else {
|
||||
xe::threading::Sleep(
|
||||
std::chrono::milliseconds::duration(wait / 0x100));
|
||||
xe::threading::Sleep(std::chrono::milliseconds(wait / 0x100));
|
||||
}
|
||||
xe::threading::SyncMemory();
|
||||
ReturnFromWait();
|
||||
|
|
|
@ -126,7 +126,7 @@ X_STATUS GL4GraphicsSystem::Setup(cpu::Processor* processor,
|
|||
MarkVblank();
|
||||
last_frame_time = current_time;
|
||||
}
|
||||
xe::threading::Sleep(std::chrono::milliseconds::duration(1));
|
||||
xe::threading::Sleep(std::chrono::milliseconds(1));
|
||||
}
|
||||
return 0;
|
||||
}));
|
||||
|
|
|
@ -32,7 +32,7 @@ XXMPApp::XXMPApp(KernelState* kernel_state)
|
|||
X_RESULT XXMPApp::XMPGetStatus(uint32_t state_ptr) {
|
||||
// Some stupid games will hammer this on a thread - induce a delay
|
||||
// here to keep from starving real threads.
|
||||
xe::threading::Sleep(std::chrono::milliseconds::duration(1));
|
||||
xe::threading::Sleep(std::chrono::milliseconds(1));
|
||||
|
||||
XELOGD("XMPGetStatus(%.8X)", state_ptr);
|
||||
xe::store_and_swap<uint32_t>(memory_->TranslateVirtual(state_ptr),
|
||||
|
|
|
@ -585,7 +585,7 @@ void KernelState::CompleteOverlappedDeferredEx(
|
|||
dispatch_queue_.push_back([this, completion_callback, overlapped_ptr, result,
|
||||
extended_error, length]() {
|
||||
xe::threading::Sleep(
|
||||
std::chrono::milliseconds::duration(kDeferredOverlappedDelayMillis));
|
||||
std::chrono::milliseconds(kDeferredOverlappedDelayMillis));
|
||||
completion_callback();
|
||||
CompleteOverlappedEx(overlapped_ptr, result, extended_error, length);
|
||||
});
|
||||
|
|
|
@ -409,7 +409,7 @@ void XThread::Execute() {
|
|||
// All threads get a mandatory sleep. This is to deal with some buggy
|
||||
// games that are assuming the 360 is so slow to create threads that they
|
||||
// have time to initialize shared structures AFTER CreateThread (RR).
|
||||
xe::threading::Sleep(std::chrono::milliseconds::duration(100));
|
||||
xe::threading::Sleep(std::chrono::milliseconds(100));
|
||||
|
||||
int exit_code = 0;
|
||||
|
||||
|
|
|
@ -346,7 +346,7 @@ SHIM_CALL XMABlockWhileInUse_shim(PPCContext* ppc_context,
|
|||
if (!context.input_buffer_0_valid && !context.input_buffer_1_valid) {
|
||||
break;
|
||||
}
|
||||
xe::threading::Sleep(std::chrono::milliseconds::duration(1));
|
||||
xe::threading::Sleep(std::chrono::milliseconds(1));
|
||||
} while (true);
|
||||
|
||||
SHIM_SET_RETURN_32(0);
|
||||
|
|
Loading…
Reference in New Issue