times.3

来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 3 代码 · 共 51 行

3
51
字号
.\" SCCSID: @(#)times.3	2.1	3/10/87.TH times 3.SH Nametimes \- get process times.SH Syntax.nf.B "#include <sys/times.h>.PP.B clock_t.B times(\fIbuffer\fP).B struct tms *\fIbuffer\fP;.fi.SH Description.NXR "times subroutine".NXR "process" "getting time-accounting information"The.PN timessubroutinereturns time-accounting informationfor the current processand for the terminated child processesof the current process.All times are in 1/HZ seconds, where HZ is equivalent to 60..PPThe following structure is returned by.PN times:.EX 0struct tms {        clock_t  tms_utime;     /* user time */        clock_t  tms_stime;     /* system time */        clock_t  tms_cutime;    /* user time, children */        clock_t  tms_cstime;    /* system time, children */};.EE.PPThe children times are the sumof the children's process times andtheir children's times..SH Return ValuesIf successful, the function .PN times returns the elapsed time since00:00:00 GMT, January 1, 1970 in units of 1/60's of a second.When the function.PN times fails, it returns \-1.SH See Alsotime(1), getrusage(2), wait3(2), time(3)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?