time 指令 !
會顯示 執行的 時間 列表 !!!
ex
time /.a.out
會顯示出
4. real 0m0.136s
5. user 0m0.010s
6. sys 0m0.070s
類似這樣的結果
2012年3月25日 星期日
2012年3月20日 星期二
pid_t
http://www.delorie.com/gnu/docs/glibc/libc_566.html
26.3 Process Identification
The pid_t data type represents process IDs. You can get the process ID of a process by calling getpid. The function getppid returns the process ID of the parent of the current process (this is also known as the parent process ID). Your program should include the header files `unistd.h' and `sys/types.h' to use these functions.
Data Type: pid_t
The pid_t data type is a signed integer type which is capable of representing a process ID. In the GNU library, this is an int.
Function: pid_t getpid (void)
The getpid function returns the process ID of the current process.
Function: pid_t getppid (void)
The getppid function returns the process ID of the parent of the current process.
26.3 Process Identification
The pid_t data type represents process IDs. You can get the process ID of a process by calling getpid. The function getppid returns the process ID of the parent of the current process (this is also known as the parent process ID). Your program should include the header files `unistd.h' and `sys/types.h' to use these functions.
Data Type: pid_t
The pid_t data type is a signed integer type which is capable of representing a process ID. In the GNU library, this is an int.
Function: pid_t getpid (void)
The getpid function returns the process ID of the current process.
Function: pid_t getppid (void)
The getppid function returns the process ID of the parent of the current process.
訂閱:
文章 (Atom)