CFileTime::operator <

更新 : 2007 年 11 月

2 つの CFileTime オブジェクトを比較して、小さい方を決定します。

bool operator<( 
   CFileTime ft  
) const throw( );

パラメータ

  • ft
    比較する CFileTime オブジェクト。

戻り値

1 番目のオブジェクトが 2 番目のオブジェクトよりも小さい (つまり前の時刻) 場合は true を返します。それ以外の場合は false を返します。

使用例

// Test for one time less than another
// Declare the CFileType objects
CFileTime myFT1, myFT2;

// Obtain the first time value
myFT1 = CFileTime::GetCurrentTime();

// Pause for a moment...
Sleep(1000);

// Obtain the second time value
myFT2 = CFileTime::GetCurrentTime();

// Perform the comparison
if (myFT1 < myFT2)
   _tprintf_s(_T("Time is going in the correct direction.\n"));
else
   _tprintf_s(_T("Oh dear. Time is going backwards.\n"));

必要条件

ヘッダー : atltime.h

参照

参照

CFileTime クラス

その他の技術情報

CFileTime のメンバ