2020-01-18 09:38:21 +01:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 09:38:21 +01:00
|
|
|
*/
|
|
|
|
|
2019-06-07 11:49:03 +02:00
|
|
|
#include <errno.h>
|
|
|
|
#include <sys/times.h>
|
2021-02-05 12:16:30 +01:00
|
|
|
#include <syscall.h>
|
2018-11-05 16:40:48 +01:00
|
|
|
|
2018-12-03 01:12:26 +01:00
|
|
|
clock_t times(struct tms* buf)
|
2018-11-05 16:40:48 +01:00
|
|
|
{
|
2018-12-21 03:02:06 +01:00
|
|
|
int rc = syscall(SC_times, buf);
|
2018-12-03 01:12:26 +01:00
|
|
|
__RETURN_WITH_ERRNO(rc, rc, (clock_t)-1);
|
2018-11-05 16:40:48 +01:00
|
|
|
}
|