CFileTime::operator <
這個運算子比較兩個物件 CFileTime 判斷較少。
bool operator<(
CFileTime ft
) const throw( );
參數
- ft
要比較的 CFileTime 物件。
傳回值
傳回 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"));
需求
Header: atltime.h