summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibC/times.cpp
blob: 9211373f02258f41acf477726a6a45174ab5728c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/*
 * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#include <errno.h>
#include <sys/times.h>
#include <syscall.h>

clock_t times(struct tms* buf)
{
    int rc = syscall(SC_times, buf);
    __RETURN_WITH_ERRNO(rc, rc, (clock_t)-1);
}