clock.3
来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 3 代码 · 共 41 行
3
41 行
.\" SCCSID: @(#)clock.3 8.1 9/11/90.TH clock 3 .SH Nameclock \- report CPU time used.SH Syntax.B #include <time.h>.PP.B clock_t clock ( ).PP.B CLOCKS_PER_SEC.SH Description.NXR "clock subroutine".NXR "time" "reporting"The.PN clockroutine returns the amount of CPU time (in microseconds) used since thefirst call to.PN clock .The time reported is the sum of the user and system times of thecalling process and its terminated child processes for which it has executed .MS wait 2or .MS system 3 .To determine the time in seconds, the value returned by.PN clockshould be divided by the value of the macro CLOCKS_PER_SEC..PPThe resolution of the clock is 16.667 milliseconds..SH RestrictionsThe value returned by.PN clockis defined in microseconds for compatibility with systems that haveCPU clocks with much higher resolution.Because of this, the value returnedwill wrap around after accumulatingonly 2147 seconds of CPU time (about 36 minutes)..SH See Alsowait(2), times(3), system(3)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?