blob: 78a93fac5aedd7e074723a61dac69cc24fa3804f [file] [log] [blame]
rsccfa37a72004-04-10 18:53:55 +00001.TH CPUTIME 3
2.SH NAME
3cputime, 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
11int times(long t[4])
12.PP
13.B
14double cputime(void)
15.SH DESCRIPTION
16If
17.I t
18is non-null,
19.I times
20fills it in
21with the number of milliseconds spent in user code, system calls,
22child processes in user code, and child processes in system calls.
23.I Cputime
24returns the sum of those same times, converted to seconds.
25.I Times
26returns the elapsed real time, in milliseconds, that the process has been running.
rsccfa37a72004-04-10 18:53:55 +000027.SH SOURCE
rscc3674de2005-01-11 17:37:33 +000028.B \*9/src/lib9/time.c