Blame


1 cfa37a7b 2004-04-10 devnull .TH CPUTIME 3
2 cfa37a7b 2004-04-10 devnull .SH NAME
3 cfa37a7b 2004-04-10 devnull cputime, times \- cpu time in this process and children
4 cfa37a7b 2004-04-10 devnull .SH SYNOPSIS
5 cfa37a7b 2004-04-10 devnull .B #include <u.h>
6 cfa37a7b 2004-04-10 devnull .br
7 cfa37a7b 2004-04-10 devnull .B #include <libc.h>
8 cfa37a7b 2004-04-10 devnull .PP
9 cfa37a7b 2004-04-10 devnull .ta \w'\fLdouble 'u
10 cfa37a7b 2004-04-10 devnull .B
11 cfa37a7b 2004-04-10 devnull int times(long t[4])
12 cfa37a7b 2004-04-10 devnull .PP
13 cfa37a7b 2004-04-10 devnull .B
14 cfa37a7b 2004-04-10 devnull double cputime(void)
15 cfa37a7b 2004-04-10 devnull .SH DESCRIPTION
16 cfa37a7b 2004-04-10 devnull If
17 cfa37a7b 2004-04-10 devnull .I t
18 cfa37a7b 2004-04-10 devnull is non-null,
19 cfa37a7b 2004-04-10 devnull .I times
20 cfa37a7b 2004-04-10 devnull fills it in
21 cfa37a7b 2004-04-10 devnull with the number of milliseconds spent in user code, system calls,
22 cfa37a7b 2004-04-10 devnull child processes in user code, and child processes in system calls.
23 cfa37a7b 2004-04-10 devnull .I Cputime
24 cfa37a7b 2004-04-10 devnull returns the sum of those same times, converted to seconds.
25 cfa37a7b 2004-04-10 devnull .I Times
26 cfa37a7b 2004-04-10 devnull returns the elapsed real time, in milliseconds, that the process has been running.
27 cfa37a7b 2004-04-10 devnull .PP
28 cfa37a7b 2004-04-10 devnull These functions read
29 cfa37a7b 2004-04-10 devnull .BR /dev/cputime ,
30 cfa37a7b 2004-04-10 devnull opening that file when they are first called.
31 cfa37a7b 2004-04-10 devnull .SH SOURCE
32 b5fdffee 2004-04-19 devnull .B /usr/local/plan9/src/libc/9sys
33 cfa37a7b 2004-04-10 devnull .SH SEE ALSO
34 cfa37a7b 2004-04-10 devnull .IR cons (3)