mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-30 21:28:40 +00:00
The kernel now bills processes for time spent in kernelspace and userspace separately. The accounting is forwarded to the parent process in reap(). This makes the "time" builtin in bash work.
10 lines
213 B
C++
10 lines
213 B
C++
#include <sys/times.h>
|
|
#include <errno.h>
|
|
#include <Kernel/Syscall.h>
|
|
|
|
clock_t times(struct tms* buf)
|
|
{
|
|
int rc = Syscall::invoke(Syscall::SC_times, (dword)buf);
|
|
__RETURN_WITH_ERRNO(rc, rc, (clock_t)-1);
|
|
}
|