mirror of
https://github.com/RGBCube/serenity
synced 2026-01-13 07:40:59 +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.
9 lines
213 B
C++
9 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);
|
|
}
|