Unify steady and system clock

This commit is contained in:
Maurice Heumann
2025-03-18 12:10:59 +01:00
parent 450e3c2a9c
commit 2cc2137c3a
12 changed files with 83 additions and 100 deletions

View File

@@ -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;