Common::Timer: use chrono::steady_clock internally

This commit is contained in:
Shawn Hoffman
2022-07-17 20:43:47 -07:00
parent 8d16971a6f
commit 09089eeee0
21 changed files with 139 additions and 257 deletions

View File

@ -657,7 +657,7 @@ std::optional<IPCReply> Kernel::HandleIPCCommand(const Request& request)
return IPCReply{IPC_EINVAL, 550_tbticks};
std::optional<IPCReply> ret;
const u64 wall_time_before = Common::Timer::GetTimeUs();
const u64 wall_time_before = Common::Timer::NowUs();
switch (request.command)
{
@ -686,7 +686,7 @@ std::optional<IPCReply> Kernel::HandleIPCCommand(const Request& request)
break;
}
const u64 wall_time_after = Common::Timer::GetTimeUs();
const u64 wall_time_after = Common::Timer::NowUs();
constexpr u64 BLOCKING_IPC_COMMAND_THRESHOLD_US = 2000;
if (wall_time_after - wall_time_before > BLOCKING_IPC_COMMAND_THRESHOLD_US)
{