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