28 #ifndef STTCL_DEFAULT_TIMEDURATIONIMPL
29 #if defined(STTCL_POSIX_TIME) or defined(STTCL_POSIX_IMPL)
30 #include "../PosixTime/SttclPosixTime.h"
31 #define STTCL_DEFAULT_TIMEDURATIONIMPL sttcl::internal::posix_impl::SttclPosixTimeDuration
32 #elif defined(STTCL_BOOST_TIME) or defined(STTCL_BOOST_IMPL)
33 #include "../BoostTime/SttclBoostTime.h"
34 #define STTCL_DEFAULT_TIMEDURATIONIMPL sttcl::internal::boost_impl::SttclBoostTimeDuration
35 #elif defined(STTCL_CX11_TIME) or defined(STTCL_CX11_IMPL)
36 #include "../C++11Time/SttclCx11Time.h"
37 #define STTCL_DEFAULT_TIMEDURATIONIMPL sttcl::internal::cx11_impl::SttclCx11TimeDuration
40 #ifndef STTCL_DEFAULT_TIMEDURATIONIMPL
41 #error "You need to define a default time duration implementation for sttcl"
54 template<
class Implementation = STTCL_DEFAULT_TIMEDURATIONIMPL>
56 :
public Implementation
78 TimeDuration(
unsigned int argHours = 0,
unsigned int argMinutes = 0,
unsigned int argSeconds = 0,
unsigned int argMilliSeconds = 0,
unsigned long argMicroSeconds = 0,
unsigned long argNanoSeconds = 0)
79 : Implementation(argHours,argMinutes,argSeconds,argMilliSeconds,argMicroSeconds,argNanoSeconds)
88 : Implementation(static_cast<const Implementation&>(rhs))
96 : Implementation(nativeTimeDuration)
151 bool operator<(const TimeDuration<Implementation>& rhs)
const
153 return Implementation::operator<(static_cast<const Implementation&>(rhs));
160 bool operator<=(const TimeDuration<Implementation>& rhs)
const
162 return Implementation::operator<=(static_cast<const Implementation&>(rhs));
336 template<
class Implementation>
340 return result += op2;
343 template<
class Implementation>
347 return result -= op2;
349 template<
class Implementation>
353 return result *= op2;
355 template<
class Implementation>
359 return result /= op2;
362 template<
class Implementation>