?? ticks.c
字號:
/*# proc: ticks - returns the number of clock cycles (ticks) used by a process.# proc:# proc: ticksPerSec - returns the system definition for HZ, where 1/HZ seconds# proc: is a tick (HZ = 60).*//* Timing stuff. This ought to be in a library */#include <sys/types.h>#include <sys/times.h>#include <sys/param.h>/* ticks, Jim Blue, 13-Nov-90 15:41 * Get number of ticks used by process. */unsigned longticks(){ struct tms buff; times(&buff); return buff.tms_utime;}/* ticksPerSec 13-Nov-90 15:41 * Get number of ticks per second reported by times(). */intticksPerSec(){ return HZ; /* from param.h */}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -