다음을 통해 공유


duration 클래스

이 시간 간격 보유하고 있는 형식에 설명하는데, 두 시점 간의 경과된 시간입니다.

template<
   class Rep,
   class Period = ratio<1>
>
class duration;
template<
   class Rep,
   class Period
>
class duration;
template<
   class Rep,
   class Period1,
   class Period2
>
class duration
   <duration<Rep, Period1>, Period2>;

설명

템플릿 인수 Rep 는 간격에 클록 틱 수를 보유하는 데 사용 되는 형식을 설명 합니다. 템플릿 인수 Period 는 비율 나타내는 각 눈금 간격의 크기를 설명하는 인스턴스 입니다.

멤버

공용 Typedefs

Name

설명

duration::period Typedef

동의어에 대한 템플릿 Period매개 변수를 나타냅니다.

duration::rep Typedef

동의어에 대한 템플릿 Rep매개 변수를 나타냅니다.

Public 생성자

Name

설명

duration::duration 생성자

duration 개체를 생성합니다.

Public 메서드

Name

설명

duration::count 메서드

개체에 대한 클록 시간의 틱 수를 반환합니다.

duration::max 메서드

Static. 템플릿 매개 Ref 변수에 허용되는 최대 값을 반환 합니다.

duration::min 메서드

Static. 템플릿 매개 Ref 변수에 허용되는 최소 값을 반환 합니다.

duration::zero 메서드

Static. 사실, Rep(0)를 반환합니다.

Public 연산자

Name

설명

duration::operator- 연산자

부정된 틱 수의 duration 개체 복사본을 반환합니다.

duration::operator-- 연산자

저장된 tick 횟수를 줄입니다.

duration::operator= 연산자

지정된 값을 나눈 나머지 값으로 저장된 틱 수를 줄일 수 있습니다.

duration::operator*= 연산자

지정된 값을 저장된 틱 수를 곱합니다.

duration::operator/= 연산자

duration 개체 지정된 틱 수로 저장된 틱 수를 나눕니다.

duration::operator+ 연산자

*this를 반환합니다.

duration::operator++ 연산자

저장된 tick 횟수를 증가합니다.

duration::operator+= 연산자

저장된 틱 카운터의 duration 개체 지정된 틱 수로 저장된 틱 수를 추가합니다.

duration::operator-= 연산자

저장된 틱 카운터의 duration 개체 지정된 틱 수로 저장된 틱 수를 뺍니다.

요구 사항

Header: chrono

네임 스페이스: std::chrono

참고 항목

참조

<chrono>

duration_values 구조체

기타 리소스

C++ 표준 라이브러리 헤더 파일