mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-12 01:38:37 +12:00
Asmjit updated
This commit is contained in:
parent
dab3d6c6d6
commit
a71053ae15
7 changed files with 96 additions and 48 deletions
|
@ -103,31 +103,31 @@ s32 sys_timer_disconnect_event_queue(u32 timer_id)
|
|||
|
||||
s32 sys_timer_sleep(u32 sleep_time)
|
||||
{
|
||||
sys_timer.Warning("sys_timer_sleep(sleep_time=%d)", sleep_time);
|
||||
sys_timer.Log("sys_timer_sleep(sleep_time=%d)", sleep_time);
|
||||
for (u32 i = 0; i < sleep_time; i++)
|
||||
{
|
||||
std::this_thread::sleep_for(std::chrono::seconds(1));
|
||||
if (Emu.IsStopped())
|
||||
{
|
||||
sys_timer.Warning("sys_timer_sleep(sleep_time=%d)", sleep_time);
|
||||
return CELL_OK;
|
||||
}
|
||||
std::this_thread::sleep_for(std::chrono::seconds(1));
|
||||
}
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 sys_timer_usleep(u64 sleep_time)
|
||||
{
|
||||
sys_timer.Warning("sys_timer_usleep(sleep_time=%lld)", sleep_time);
|
||||
sys_timer.Log("sys_timer_usleep(sleep_time=%lld)", sleep_time);
|
||||
if (sleep_time > 0xFFFFFFFFFFFF) sleep_time = 0xFFFFFFFFFFFF; //2^48-1
|
||||
for (u64 i = 0; i < sleep_time; i += 1000000)
|
||||
for (u32 i = 0; i < sleep_time / 1000000; i++)
|
||||
{
|
||||
std::this_thread::sleep_for(std::chrono::seconds(1));
|
||||
if (Emu.IsStopped())
|
||||
{
|
||||
sys_timer.Warning("sys_timer_usleep(sleep_time=%lld)", sleep_time);
|
||||
return CELL_OK;
|
||||
}
|
||||
std::this_thread::sleep_for(std::chrono::seconds(1));
|
||||
}
|
||||
std::this_thread::sleep_for(std::chrono::microseconds(sleep_time % 1000000));
|
||||
return CELL_OK;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue