Print the sleep duration before actually sleeping

This commit is contained in:
◱ PixelyIon 2020-07-06 22:11:18 +01:00 committed by ◱ PixelyIon
parent c708c353e3
commit 180ba97440

View File

@ -263,12 +263,12 @@ namespace skyline::kernel::svc {
state.logger->Debug("svcSleepThread: Yielding thread: {}", in);
break;
default:
state.logger->Debug("svcSleepThread: Thread sleeping for {} ns", in);
struct timespec spec = {
.tv_sec = static_cast<time_t>(state.ctx->registers.x0 / 1000000000),
.tv_nsec = static_cast<long>(state.ctx->registers.x0 % 1000000000)
};
nanosleep(&spec, nullptr);
state.logger->Debug("svcSleepThread: Thread sleeping for {} ns", in);
}
}