mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-18 19:23:56 +00:00
Unify steady and system clock
This commit is contained in:
@@ -148,7 +148,7 @@ bool emulator_thread::is_terminated() const
|
||||
return this->exit_status.has_value();
|
||||
}
|
||||
|
||||
bool emulator_thread::is_thread_ready(process_context& process, utils::steady_clock& steady_clock)
|
||||
bool emulator_thread::is_thread_ready(process_context& process, utils::clock& clock)
|
||||
{
|
||||
if (this->is_terminated())
|
||||
{
|
||||
@@ -162,7 +162,7 @@ bool emulator_thread::is_thread_ready(process_context& process, utils::steady_cl
|
||||
this->mark_as_ready(STATUS_ALERTED);
|
||||
return true;
|
||||
}
|
||||
if (this->is_await_time_over(steady_clock))
|
||||
if (this->is_await_time_over(clock))
|
||||
{
|
||||
this->mark_as_ready(STATUS_TIMEOUT);
|
||||
return true;
|
||||
@@ -194,7 +194,7 @@ bool emulator_thread::is_thread_ready(process_context& process, utils::steady_cl
|
||||
return true;
|
||||
}
|
||||
|
||||
if (this->is_await_time_over(steady_clock))
|
||||
if (this->is_await_time_over(clock))
|
||||
{
|
||||
this->mark_as_ready(STATUS_TIMEOUT);
|
||||
return true;
|
||||
@@ -205,7 +205,7 @@ bool emulator_thread::is_thread_ready(process_context& process, utils::steady_cl
|
||||
|
||||
if (this->await_time.has_value())
|
||||
{
|
||||
if (this->is_await_time_over(steady_clock))
|
||||
if (this->is_await_time_over(clock))
|
||||
{
|
||||
this->mark_as_ready(STATUS_SUCCESS);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user