EN JA
TIME(9)
TIME(9) FreeBSD Kernel Developer's Manual TIME(9)

名称

boottime, time_second, time_uptimeシステム時間変数

書式

#include < sys/time.h>


extern struct timeval boottime;
extern time_t time_second;
extern time_t time_uptime;

解説

boottime 変数は、システムのブート時間を保持しています。

time_second 変数は、秒単位のシステムの“実時間”クロックです。

time_uptime 変数は、ブートしたときからの秒数です。

bintime(9), getbintime(9), microtime(9), getmicrotime(9), nanotime(9)getnanotime(9) 関数は、現在の時刻をより正確で不可分な方法で取得するために使用することができます。同様に、 binuptime(9), getbinuptime(9), microuptime(9), getmicrouptime(9), nanouptime(9)getnanouptime(9) 関数は、ブートしたときからの経過時間をより正確で不可分な方法で取得するために使用することができます。 boottime 変数は、特別な安全上の注意なしで読み込み書き込みすることができます。

関連項目

clock_settime(2), ntp_adjtime(2), settimeofday(2), bintime(9), binuptime(9), getbintime(9), getbinuptime(9), getmicrotime(9), getmicrouptime(9), getnanotime(9), getnanouptime(9), microtime(9), microuptime(9), nanotime(9), nanouptime(9) Poul-Henning Kamp, Timecounters: Efficient and precise timekeeping in SMP kernels, Proceedings of EuroBSDCon 2002, Amsterdam, /usr/share/doc/papers/timecounter.ascii.gz. Marshall Kirk McKusick and George V. Neville-Neil, The Design and Implementation of the FreeBSD Operating System, Addison-Wesley, 57-61,65-66, July 2004.
September 17, 2004 FreeBSD