.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\" References consulted: .\" Linux libc source code .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sat Jul 24 19:48:17 1993 by Rik Faith (faith@cs.unc.edu) .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" Japanese Version Copyright (c) 1997 NAGOYA Hiroaki .\" all rights reserved. .\" Translated Mon Feb 10 1997 by Hiroaki Nagoya .\" Updated & Modified Sat Mar 23 23:57:43 JST 2002 .\" by Yuichi SATO .\" .TH DIFFTIME 3 " 2015\-08\-08" GNU "Linux Programmer's Manual" .SH 名前 difftime \- 時刻の間隔の計算 .SH 書式 .nf \fB#include \fP .PP \fBdouble difftime(time_t \fP\fItime1\fP\fB, time_t \fP\fItime0\fP\fB);\fP .fi .SH 説明 関数 \fBdifftime\fP() は時刻 \fItime0\fP から 時刻 \fItime1\fP までの経過時間を \fIdouble\fP 型で返す。各々の時刻はカレンダー時間で指定する。 つまり、紀元 (Epoch; 1970\-01\-01 00:00:00 +0000 (UTC)) からの 経過時間を秒単位で指定する。 .SH 属性 この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。 .TS allbox; lb lb lb l l l. インターフェース 属性 値 T{ \fBdifftime\fP() T} Thread safety MT\-Safe .TE .SH 準拠 POSIX.1\-2001, POSIX.1\-2008, C89, C99, SVr4, 4.3BSD. .SH 注意 POSIX システムでは \fItime_t\fP は数値型なので、引き算の際に起こる可能性のあるオーバーフローを 気にしない場合は、単純に .PP .in +4n .EX #define difftime(t1,t0) (double)(t1 \- t0) .EE .in .PP と定義できる。 .SH 関連項目 \fBdate\fP(1), \fBgettimeofday\fP(2), \fBtime\fP(2), \fBctime\fP(3), \fBgmtime\fP(3), \fBlocaltime\fP(3) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は \%https://www.kernel.org/doc/man\-pages/ に書かれている。