The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
times.h
Go to the documentation of this file.
1#pragma once
2
3#include <sys/types.h>
4
5/**
6 * @file sys/times.h
7 * @brief process CPU times.
8 *
9 * the four times are in clock ticks: sysconf-free ginnOS has 100 per
10 * second (CLK_TCK). struct tms is ABI (kernel/time/clock.c).
11 */
12
13#define CLK_TCK 100
14
15struct tms
16{
17 clock_t tms_utime; // user time of the process
18 clock_t tms_stime; // system time of the process
19 clock_t tms_cutime; // user time of its reaped children
20 clock_t tms_cstime; // system time of its reaped children
21};
22
23/**
24 * the CPU times of the process and its reaped children.
25 * @return the ticks since boot.
26 */
27clock_t times(struct tms *buf);
Definition times.h:16
clock_t tms_utime
Definition times.h:17
clock_t tms_stime
Definition times.h:18
clock_t tms_cstime
Definition times.h:20
clock_t tms_cutime
Definition times.h:19
clock_t times(struct tms *buf)
the CPU times of the process and its reaped children.
basic system types.
long clock_t
Definition types.h:29