?? 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 + -