Blob


1 .TH CPUTIME 3
2 .SH NAME
3 cputime, times \- cpu time in this process and children
4 .SH SYNOPSIS
5 .B #include <u.h>
6 .br
7 .B #include <libc.h>
8 .PP
9 .ta \w'\fLdouble 'u
10 .B
11 int times(long t[4])
12 .PP
13 .B
14 double cputime(void)
15 .SH DESCRIPTION
16 If
17 .I t
18 is non-null,
19 .I times
20 fills it in
21 with the number of milliseconds spent in user code, system calls,
22 child processes in user code, and child processes in system calls.
23 .I Cputime
24 returns the sum of those same times, converted to seconds.
25 .I Times
26 returns the elapsed real time, in milliseconds, that the process has been running.
27 .SH SOURCE
28 .B \*9/src/lib9/time.c