📄 get_cpustamp.c
字号:
/*** $Id: get_cpustamp.c,v 1.1 2001/04/19 00:03:03 rosinski Exp $*/#include <sys/times.h> /* times */#include "gpt.h"/*** get_cpustamp: Invoke the proper system timer and return stats.**** Output arguments:** usr: user time (usec if USE_GETRUSAGE is defined, ticks otherwise)** sys: system time (usec if USE_GETRUSAGE is defined, ticks otherwise)**** Return value: 0 (success)*/int get_cpustamp (long *usr, long *sys){ struct tms buf; /* ** Throw away the wallclock time from times: use gettimeofday instead */ (void) times (&buf); *usr = buf.tms_utime; *sys = buf.tms_stime; return 0;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -