1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:58:11 +00:00

Kernel: Add CLOCK_MONOTONIC_COARSE to the kernel time page

This allows clock_gettime(CLOCK_MONOTONIC_COARSE) without syscalls.
Core::EventLoop takes advantage of this automatically. :^)
This commit is contained in:
Andreas Kling 2021-08-10 21:31:31 +02:00
parent aaead6f332
commit b7dae4f90e
2 changed files with 6 additions and 4 deletions

View file

@ -18,7 +18,7 @@ namespace Kernel {
inline bool time_page_supports(clockid_t clock_id)
{
return clock_id == CLOCK_REALTIME_COARSE;
return clock_id == CLOCK_REALTIME_COARSE || clock_id == CLOCK_MONOTONIC_COARSE;
}
struct TimePage {