| 総合手引 | セクション 3 | English | オプション |
#include <sys/times.h>
times() 関数は、1970 年 1 月 1 日 0 時 0 分 0 秒で調整された世界時から測った CLK_TCK の時間値を秒で返します。
この関数は、 tp により指示された構造に時間計測情報を書込みます。
tms 構造は、次のように定義されます:
struct tms {
clock_t tms_utime;
clock_t tms_stime;
clock_t tms_cutime;
clock_t tms_cstime;
};
この構造の要素は、次のように定義されます:
| tms_utime | |
| ユーザインストラクションの実行に対して請求される CPU タイム。 | |
| tms_stime | |
| その処理のためのシステムによる実行に対して請求される CPU タイム。 | |
| tms_cutime | |
| 子プロセスの tms_utime s および tms_cutime s の和。 | |
| tms_cstime | |
| 子プロセスの tms_stimes および tms_cstimes の和。 | |
すべての時間は、 CLK_TCK 秒で表されます。
終了した子プロセスの時間は、 wait(2) 関数の 1 つが終了した子のプロセス ID をその親に返したときに、その親の tms_cutime および tms_cstime の要素にインクルードされます。エラーが起きた場合は、 times() 関数は値 ((clock_t )-1) を返し、エラーを示す errno を設定します。
| TIMES (3) | June 4, 1993 |
| 総合手引 | セクション 3 | English | オプション |
このマニュアルページサービスについてのご意見は Ben Bullock にお知らせください。 Privacy policy.
| “ | Modern Unix impedes progress in computer science, wastes billions of dollars, and destroys the common sense of many who seriously use it. | ” |
| — The Unix Haters' handbook | ||