times(2) Linux man page
Name
times - get process times
Synopsis
#include <sys/times.h>
clock_t times(struct tms *buf);
Description
times() stores the current process times in the
struct tms that buf points to. The struct tms is as defined
in <sys/times.h>
:
struct tms {
clock_t tms_utime; /* user time */
clock_t tms_stime; /* system time */
clock_t tms_cutime; /* user time of children */
clock_t tms_cstime; /* system time of children */
};
The tms_utime field contains the CPU time spent executing
instructions of the calling process. The tms_stime field contains the CPU
time spent in the system while executing tasks on behalf of the calling process.
The tms_cutime field contains the sum of the tms_utime and
tms_cutime values for all waited-for terminated children. The
tms_cstime field contains the sum of the tms_stime and
tms_cstime values for all waited-for terminated children.
Times for terminated children (and their descendants) is added in at the
moment wait(2) or waitpid(2) returns their process ID. In particular,
times of grandchildren that the children did not wait for are never seen.
All times reported are in clock ticks.
Return Value
times() returns the number of
clock ticks that have elapsed since an arbitrary point in the past. For Linux
2.4 and earlier this point is the moment the system was booted. Since Linux 2.6,
this point is (2^32/HZ) - 300 (i.e., about 429 million) seconds before
system boot time. The return value may overflow the possible range of type
clock_t. On error, (clock_t) -1 is returned, and errno is
set appropriately.
Notes
The number of clock ticks per second can be obtained using
sysconf(_SC_CLK_TCK);
In POSIX-1996 the symbol CLK_TCK
(defined in <time.h>) is
mentioned as obsolescent. It is obsolete now.
In Linux kernel versions before 2.6.9, if the disposition of SIGCHLD
is set to SIG_IGN then the times of terminated children are automatically
included in the tms_cstime
Ïà¹ØÎĵµ£º
×ÜÀÀ
ÓÃiptables -ADC À´Ö¸¶¨Á´µÄ¹æ
Ôò
£¬-AÌí¼Ó -Dɾ³ý -C ÐÞ¸Ä
iptables - [RI] chain rule num rule-specification[option]
ÓÃiptables - RI ͨ¹ý¹æÔòµÄ˳ÐòÖ¸¶¨
iptables -D chain rule num[option]
ɾ³ýÖ¸¶¨¹æÔò
iptables -[LFZ] [chain][option]
ÓÃiptables -LFZ Á´Ãû [Ñ¡Ïî]
iptables -[NX] chain
ÓÃ -NX ......
2009 Äê 4 ÔÂ 23 ÈÕ
±¾ÎÄÖÐÎÒÃÇÕë¶Ô Linux É϶àÏ̱߳à³ÌµÄÖ÷ÒªÌØÐÔ×ܽá³ö 5 Ìõ¾Ñ飬ÓÃÒÔ¸ÄÉÆ Linux ¶àÏ̱߳à³ÌµÄÏ°¹ßºÍ±ÜÃâÆäÖеĿª·¢ÏÝÚå¡£ÔÚ±¾ÎÄÖУ¬ÎÒÃÇ´©²åһЩ Windows µÄ±à³ÌÓÃÀýÓÃÒÔ¶Ô±È Linux ÌØÐÔ£¬ÒÔ¼ÓÉî¶ÁÕßÓ¡Ïó¡£
±³¾°
Linux ƽ̨ÉϵĶàÏ̳߳ÌÐò¿ª·¢Ïà¶ÔÓ¦ÆäËûƽ̨£¨±ÈÈç Windows£©µÄ¶àÏß³Ì API ÓÐһЩϸ΢ ......
Ò»¡¢ÒýÑÔ£º
±¾ÎĵµµÄÄÚÈݴ󲿷ÝÄÚÈݶ¼ÊÇ´ÓÍøÉÏÊÕ¼¯¶øÀ´£¬È»ºóÅäºÏһЩеĽØͼ£¨Äں˰汾£ºV2.4.19£©¡£ÔÚÿһÅäÖÃÏîºó»áÓÐÒ»¸öÑ¡ÔñÖ¸ÄϵIJ¿·Ý£¬ÓÃÀ´Ö¸µ¼´ó¼ÒÔõôÑù¸ù¾Ý×Ô¼ºµÄÇé¿öÀ´×öÏàÓ¦µÄÑ¡Ôñ£»»¹ÓÐÔÚÿһ¸ö´óÏîºÍÎĵµµÄ×îºó»áÓÐÒ»¸ö¾Ñé̸£¬ËüÊÇһЩ¸ßÊÖÃÇÔÚÓ¦¶ÔÎÊÌâºÍ´¦ÀíÌØÓÐÓ²¼þʱµÄһЩ¾Ñ飨Õâ¸ö»¹µ ......
²»À뿪EmacsÍê³É¼òµ¥C³ÌÐòµÄ±à¼±àÒëÔËÐУ¨×ª£©
£¨1£©´ò¿ªEmacs£¬Ö´ÐÐ
$ emacs
£¨2£©½¨Á¢Ò»¸öеijÌÐòÎļþ. Ö´ÐÐ C-x C-f£¬
È»ºóÔÚÆÁÄ»µÄµ×²¿³öÏÖminibuffer£¬¹â±êÌáʾÄãÊäÈëÎļþÃû³Æ£¬
ÎļþÃû³ÆÒª´øÉϺó׺Ãû£¬Èçhello.cpp¡£»Ø³µ£¬È»ºó¿ªÊ¼±à¼Ô´´úÂë¡£
£¨3£©±àÒë´úÂë¡£Ö´ÐÐEsc-x compile£¬³öÏÖminibuffer£¬ÌáʾÄãÊäÈ ......
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm }
A:link { so-language: zxx }
-->
´ó¼ÒÖªµÀ£¬
MeeGo
×ÀÃæµÄ×î´óÌصãÊÇʹÓÃ×ÔÓÉ£¨
free
use
£©£¬²»ÂÛÄãÔÚʲôµØ·½£¨Ê²Ã´¹ú¼Ò£©£¬Ò²²»ÂÛÄãÏëÓÃËü¸ÉʲôÊÂÇé¡£ÄÇô£¬
MeeGo
ÊDz»ÊÇÀ¬»ø´úÂëÄØ£¿µ±È»²»ÊÇ¡£ ......