From ee9e941a5694258c241f80acd3b2f2e71fac0733 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Tue, 15 Apr 2025 23:35:25 +0300 Subject: [PATCH] LibC: Implement getitimer --- userspace/libraries/LibC/sys/time.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/userspace/libraries/LibC/sys/time.cpp b/userspace/libraries/LibC/sys/time.cpp index 6cb8ae7b..9667cede 100644 --- a/userspace/libraries/LibC/sys/time.cpp +++ b/userspace/libraries/LibC/sys/time.cpp @@ -17,6 +17,11 @@ int gettimeofday(struct timeval* __restrict tp, void* __restrict tzp) return 0; } +int getitimer(int which, struct itimerval* value) +{ + return setitimer(which, nullptr, value); +} + int setitimer(int which, const struct itimerval* __restrict value, struct itimerval* __restrict ovalue) { return syscall(SYS_SETITIMER, which, value, ovalue);