다음을 통해 공유


CTimeSpan::operator + =, =

추가 하 고 빼는 CTimeSpan 개체와이 CTimeSpan.

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

매개 변수

  • span
    값을 추가 하는 CTimeSpan 개체입니다.

반환 값

업데이트 된 CTimeSpan 개체입니다.

설명

이러한 연산자 더하기 및 빼기를 할 수 있는 것은 CTimeSpan 개체와이 CTimeSpan.

예제

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

요구 사항

헤더: atltime.h

참고 항목

참조

CTimeSpan 클래스

계층 구조 차트