tail head cat sleep
QR code linking to this page

manページ  — TIME

名称

time – 日時を取得

内容

ライブラリ

Standard C Library (libc, -lc)

書式

#include <time.h>

time_t
time(time_t *tloc);

解説

time() 関数は、協定世界時の 1970 年 1 月 1 日 0 時 0 分 0 秒から 数えた時間を秒単位で返します。

時間の値のコピーは、ポインタ tloc によって示される領域に保存されます。 tloc が NULL ポインタである場合は、値は保存されません。

操作が正常終了すると、 time() 関数は時間の値を返します。 そうでない場合は、 ((time_t )-1) が返され、エラーを示すためにグローバル変数 errno が設定されます。

エラー

errno には、次のエラーコードが設定されます。
[EFAULT]
  引数アドレスが不正なメモリを参照しました。

関連項目

gettimeofday(2), ctime(3)

歴史

time() 関数は、 AT&T v6 で登場しました。

TIME (3) June 4, 1993

tail head cat sleep
QR code linking to this page


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

Do you laugh when the waiter drops a tray full of dishes? Unix weenies do. They're the first ones to laugh at hapless users, trying to figure out an error message that doesn't have anything to do with what they just typed.
— The Unix Haters' handbook