Поделиться через


CTimeSpan::operator +=, -=

Adds and subtracts a CTimeSpan object to and from this CTimeSpan.

CTimeSpan& operator +=(
   CTimeSpan span 
) throw( );
CTimeSpan& operator -=(
   CTimeSpan span 
) throw( );

Параметры

  • span
    The value to add to the CTimeSpan object.

Возвращаемое значение

The updated CTimeSpan object.

Заметки

These operators allow you to add and subtract a CTimeSpan object to and from this CTimeSpan.

Пример

CTimeSpan ts1(10); // 10 seconds
CTimeSpan ts2(100); // 100 seconds
ts2 -= ts1;
ATLASSERT(ts2.GetTotalSeconds() == 90);   

Требования

Header: atltime.h

См. также

Основные понятия

CTimeSpan Class

CTimeSpan Members

Hierarchy Chart