tail head cat sleep
QR code linking to this page

manページ  — MICROUPTIME

名称

binuptime, getbinuptime, microuptime, getmicrouptime, nanouptime, getnanouptime – 起動からの経過時間の取得

内容

書式

#include <sys/time.h>

void
binuptime(struct bintime *bt);

void
getbinuptime(struct bintime *bt);

void
microuptime(struct timeval *tv);

void
getmicrouptime(struct timeval *tv);

void
nanouptime(struct timespec *ts);

void
getnanouptime(struct timespec *tsp);

解説

binuptime() および getbinuptime() 関数は、 bt によって指定されたアドレスに、 bintime 構造体として、起動からの経過時間を保存します。 microuptime() および getmicrouptime() 関数は、同等の機能を果たしますが、代りに timeval 構造体として経過時間を記録します。 同様に、 nanouptime() および getnanouptime() 関数は、 timespec 構造体として経過時間を保存します。

binuptime(), microuptime(), nanouptime() は、常に可能な限り正確な現在時刻を返す時刻カウンタを請求します。 それに反して、 getbinuptime(), getmicrouptime(), getnanouptime() 関数は、正確ではないが高速に得られる時刻を返す抽象化です。

getbinuptime(), getmicrouptime(), getnanouptime() 関数の意図は、タイマの正確さ対実行時間のユーザの好みを強化することです。

関連項目

bintime(9), getbintime(9), getmicrotime(9), getnanotime(9), microtime(9), nanotime(9), tvtohz(9)

作者

このマニュアルページは Kelly Yancey <kbyanc@posi.net> が書きました。

MICROUPTIME (9) September, 16 2004

tail head cat sleep
QR code linking to this page


このマニュアルページサービスについてのご意見は Ben Bullock にお知らせください。 Privacy policy.

There are 10 types of people in the world: those who understand binary, and those who don't.