Freigeben über


CTime Comparison Operators

Vergleichsoperatoren.

bool operator ==( 
   CTime time  
) const throw( ); 
bool operator !=( 
   CTime time  
) const throw( ); 
bool operator <( 
   CTime time  
) const throw( ); 
bool operator >( 
   CTime time  
) const throw( ); 
bool operator <=( 
   CTime time  
) const throw( ); 
bool operator >=( 
   CTime time  
) const throw( );

Parameter

  • time
    Das zu vergleichende CTime-Objekt.

Rückgabewert

Diese Operatoren vergleichen zwei Mal absolute und geben true zurück, wenn die Bedingung true ist; andernfalls false.

Beispiel

CTime t1 = CTime::GetCurrentTime();
CTime t2 = t1 + CTimeSpan(0, 1, 0, 0);    // 1 hour later
ATLASSERT(t1 != t2);
ATLASSERT(t1 < t2);
ATLASSERT(t1 <= t2);   

Anforderungen

Header: atltime.h

Siehe auch

Referenz

CTime Class

Hierarchiediagramm