25 #ifndef STTCLCX11TIME_H_
26 #define STTCLCX11TIME_H_
30 #if defined(STTCL_CX11_TIME) or defined(STTCL_CX11_IMPL)
41 class SttclCx11TimeDuration
44 typedef std::chrono::nanoseconds NativeTimeDuration;
46 SttclCx11TimeDuration(
unsigned int argHours,
unsigned int argMinutes,
unsigned int argSeconds = 0,
unsigned int argMilliSeconds = 0,
unsigned long argMicroSeconds = 0,
unsigned long argNanoSeconds = 0)
47 : td(std::chrono::hours(argHours) +
48 std::chrono::minutes(argMinutes) +
49 std::chrono::seconds(argSeconds))
51 td += std::chrono::milliseconds(argMilliSeconds);
52 td += std::chrono::microseconds(argMicroSeconds);
53 td += std::chrono::nanoseconds(argNanoSeconds);
55 SttclCx11TimeDuration(
const SttclCx11TimeDuration& rhs)
59 SttclCx11TimeDuration(
const NativeTimeDuration& nativeTimeDuration)
60 : td(nativeTimeDuration)
63 ~SttclCx11TimeDuration()
67 SttclCx11TimeDuration& operator=(
const SttclCx11TimeDuration& rhs)
73 bool operator==(
const SttclCx11TimeDuration& rhs)
const
77 bool operator!=(
const SttclCx11TimeDuration& rhs)
const
81 bool operator<(
const SttclCx11TimeDuration& rhs)
const
85 bool operator<=(
const SttclCx11TimeDuration& rhs)
const
90 bool operator>(
const SttclCx11TimeDuration& rhs)
const
94 bool operator>=(
const SttclCx11TimeDuration& rhs)
const
99 SttclCx11TimeDuration& operator+=(
const SttclCx11TimeDuration& rhs)
105 SttclCx11TimeDuration& operator-=(
const SttclCx11TimeDuration& rhs)
111 SttclCx11TimeDuration& operator*=(
int factor)
117 SttclCx11TimeDuration& operator/=(
int divider)
195 const NativeTimeDuration& getNativeValue()
const
201 NativeTimeDuration td;