Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
duration.hpp File Reference
#include <boost/chrono/config.hpp>
#include <boost/chrono/detail/static_assert.hpp>
#include <climits>
#include <limits>
#include <boost/mpl/logical.hpp>
#include <boost/ratio/ratio.hpp>
#include <boost/type_traits/common_type.hpp>
#include <boost/type_traits/is_arithmetic.hpp>
#include <boost/type_traits/is_convertible.hpp>
#include <boost/type_traits/is_floating_point.hpp>
#include <boost/type_traits/is_unsigned.hpp>
#include <boost/chrono/detail/is_evenly_divisible_by.hpp>
#include <boost/cstdint.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/detail/workaround.hpp>
#include <boost/integer_traits.hpp>
#include <boost/config/abi_prefix.hpp>
#include <boost/config/abi_suffix.hpp>
Include dependency graph for duration.hpp:
This graph shows which files directly or indirectly include this file:

Classes

class  boost::chrono::duration< Rep, Period >
 
struct  boost::chrono::detail::is_duration< T >
 
struct  boost::chrono::detail::is_duration< duration< Rep, Period > >
 
struct  boost::chrono::detail::duration_divide_result< Duration, Rep, bool >
 
struct  boost::chrono::detail::duration_divide_imp< Duration, Rep2, bool >
 
struct  boost::chrono::detail::duration_divide_imp< duration< Rep1, Period >, Rep2, true >
 
struct  boost::chrono::detail::duration_divide_result< duration< Rep1, Period >, Rep2, false >
 
struct  boost::chrono::detail::duration_divide_result2< Rep, Duration, bool >
 
struct  boost::chrono::detail::duration_divide_imp2< Rep, Duration, bool >
 
struct  boost::chrono::detail::duration_divide_imp2< Rep1, duration< Rep2, Period >, true >
 
struct  boost::chrono::detail::duration_divide_result2< Rep1, duration< Rep2, Period >, false >
 
struct  boost::chrono::detail::duration_modulo_result< Duration, Rep, bool >
 
struct  boost::chrono::detail::duration_modulo_imp< Duration, Rep2, bool >
 
struct  boost::chrono::detail::duration_modulo_imp< duration< Rep1, Period >, Rep2, true >
 
struct  boost::chrono::detail::duration_modulo_result< duration< Rep1, Period >, Rep2, false >
 
struct  boost::chrono::treat_as_floating_point< Rep >
 
struct  boost::chrono::duration_values< Rep >
 
struct  boost::chrono::detail::duration_cast_aux< FromDuration, ToDuration, Period, PeriodNumEq1, PeriodDenEq1 >
 
struct  boost::chrono::detail::duration_cast_aux< FromDuration, ToDuration, Period, true, true >
 
struct  boost::chrono::detail::duration_cast_aux< FromDuration, ToDuration, Period, true, false >
 
struct  boost::chrono::detail::duration_cast_aux< FromDuration, ToDuration, Period, false, true >
 
struct  boost::chrono::detail::duration_cast_aux< FromDuration, ToDuration, Period, false, false >
 
struct  boost::chrono::detail::duration_cast< FromDuration, ToDuration >
 
struct  boost::chrono::treat_as_floating_point< Rep >
 
struct  boost::chrono::detail::chrono_numeric_limits< T, bool >
 
struct  boost::chrono::detail::chrono_numeric_limits< T, true >
 
struct  boost::chrono::detail::chrono_numeric_limits< float, true >
 
struct  boost::chrono::detail::chrono_numeric_limits< double, true >
 
struct  boost::chrono::detail::chrono_numeric_limits< long double, true >
 
struct  boost::chrono::detail::numeric_limits< T >
 
struct  boost::chrono::duration_values< Rep >
 
struct  boost::common_type< chrono::duration< Rep1, Period1 >, chrono::duration< Rep2, Period2 > >
 
class  boost::chrono::duration< Rep, Period >
 
struct  boost::chrono::detail::duration_eq< LhsDuration, RhsDuration >
 
struct  boost::chrono::detail::duration_eq< LhsDuration, LhsDuration >
 
struct  boost::chrono::detail::duration_lt< LhsDuration, RhsDuration >
 
struct  boost::chrono::detail::duration_lt< LhsDuration, LhsDuration >
 

Namespaces

 boost
 Duration formatting facet for input.
 
 boost::chrono
 
 boost::chrono::detail
 

Macros

#define BOOST_CHRONO_A_DURATION_REPRESENTATION_CAN_NOT_BE_A_DURATION   "A duration representation can not be a duration"
 
#define BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_DURATION_MUST_BE_A_STD_RATIO   "Second template parameter of duration must be a boost::ratio"
 
#define BOOST_CHRONO_DURATION_PERIOD_MUST_BE_POSITIVE   "duration period must be positive"
 
#define BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_TIME_POINT_MUST_BE_A_BOOST_CHRONO_DURATION   "Second template parameter of time_point must be a boost::chrono::duration"
 

Typedefs

typedef duration
< boost::int_least64_t, nano > 
boost::chrono::nanoseconds
 
typedef duration
< boost::int_least64_t, micro > 
boost::chrono::microseconds
 
typedef duration
< boost::int_least64_t, milli > 
boost::chrono::milliseconds
 
typedef duration
< boost::int_least64_t > 
boost::chrono::seconds
 
typedef duration
< boost::int_least32_t, ratio< 60 > > 
boost::chrono::minutes
 
typedef duration
< boost::int_least32_t, ratio< 3600 > > 
boost::chrono::hours
 

Functions

template<class Rep1 , class Period1 , class Rep2 , class Period2 >
BOOST_CONSTEXPR common_type
< duration< Rep1, Period1 >
, duration< Rep2, Period2 >
>::type 
boost::chrono::operator+ (const duration< Rep1, Period1 > &lhs, const duration< Rep2, Period2 > &rhs)
 
template<class Rep1 , class Period1 , class Rep2 , class Period2 >
BOOST_CONSTEXPR common_type
< duration< Rep1, Period1 >
, duration< Rep2, Period2 >
>::type 
boost::chrono::operator- (const duration< Rep1, Period1 > &lhs, const duration< Rep2, Period2 > &rhs)
 
template<class Rep1 , class Period , class Rep2 >
BOOST_CONSTEXPR
boost::enable_if< mpl::and_
< boost::is_convertible< Rep1,
typename common_type< Rep1,
Rep2 >::type >
, boost::is_convertible< Rep2,
typename common_type< Rep1,
Rep2 >::type > >, duration
< typename common_type< Rep1,
Rep2 >::type, Period > >::type 
boost::chrono::operator* (const duration< Rep1, Period > &d, const Rep2 &s)
 
template<class Rep1 , class Period , class Rep2 >
BOOST_CONSTEXPR
boost::enable_if< mpl::and_
< boost::is_convertible< Rep1,
typename common_type< Rep1,
Rep2 >::type >
, boost::is_convertible< Rep2,
typename common_type< Rep1,
Rep2 >::type > >, duration
< typename common_type< Rep1,
Rep2 >::type, Period > >::type 
boost::chrono::operator* (const Rep1 &s, const duration< Rep2, Period > &d)
 
template<class Rep1 , class Period , class Rep2 >
BOOST_CONSTEXPR
boost::disable_if
< boost::chrono::detail::is_duration
< Rep2 >, typename
boost::chrono::detail::duration_divide_result
< duration< Rep1, Period >
, Rep2 >::type >::type 
boost::chrono::operator/ (const duration< Rep1, Period > &d, const Rep2 &s)
 
template<class Rep1 , class Period1 , class Rep2 , class Period2 >
BOOST_CONSTEXPR common_type
< Rep1, Rep2 >::type 
boost::chrono::operator/ (const duration< Rep1, Period1 > &lhs, const duration< Rep2, Period2 > &rhs)
 
template<class Rep1 , class Period , class Rep2 >
BOOST_CONSTEXPR
boost::disable_if
< boost::chrono::detail::is_duration
< Rep2 >, typename
boost::chrono::detail::duration_modulo_result
< duration< Rep1, Period >
, Rep2 >::type >::type 
boost::chrono::operator% (const duration< Rep1, Period > &d, const Rep2 &s)
 
template<class Rep1 , class Period1 , class Rep2 , class Period2 >
BOOST_CONSTEXPR common_type
< duration< Rep1, Period1 >
, duration< Rep2, Period2 >
>::type 
boost::chrono::operator% (const duration< Rep1, Period1 > &lhs, const duration< Rep2, Period2 > &rhs)
 
template<class Rep1 , class Period1 , class Rep2 , class Period2 >
BOOST_CONSTEXPR bool boost::chrono::operator== (const duration< Rep1, Period1 > &lhs, const duration< Rep2, Period2 > &rhs)
 
template<class Rep1 , class Period1 , class Rep2 , class Period2 >
BOOST_CONSTEXPR bool boost::chrono::operator!= (const duration< Rep1, Period1 > &lhs, const duration< Rep2, Period2 > &rhs)
 
template<class Rep1 , class Period1 , class Rep2 , class Period2 >
BOOST_CONSTEXPR bool boost::chrono::operator< (const duration< Rep1, Period1 > &lhs, const duration< Rep2, Period2 > &rhs)
 
template<class Rep1 , class Period1 , class Rep2 , class Period2 >
BOOST_CONSTEXPR bool boost::chrono::operator> (const duration< Rep1, Period1 > &lhs, const duration< Rep2, Period2 > &rhs)
 
template<class Rep1 , class Period1 , class Rep2 , class Period2 >
BOOST_CONSTEXPR bool boost::chrono::operator<= (const duration< Rep1, Period1 > &lhs, const duration< Rep2, Period2 > &rhs)
 
template<class Rep1 , class Period1 , class Rep2 , class Period2 >
BOOST_CONSTEXPR bool boost::chrono::operator>= (const duration< Rep1, Period1 > &lhs, const duration< Rep2, Period2 > &rhs)
 
template<class ToDuration , class Rep , class Period >
BOOST_CONSTEXPR
boost::enable_if
< boost::chrono::detail::is_duration
< ToDuration >, ToDuration >
::type 
boost::chrono::duration_cast (const duration< Rep, Period > &fd)
 

Macro Definition Documentation

#define BOOST_CHRONO_A_DURATION_REPRESENTATION_CAN_NOT_BE_A_DURATION   "A duration representation can not be a duration"
#define BOOST_CHRONO_DURATION_PERIOD_MUST_BE_POSITIVE   "duration period must be positive"
#define BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_DURATION_MUST_BE_A_STD_RATIO   "Second template parameter of duration must be a boost::ratio"
#define BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_TIME_POINT_MUST_BE_A_BOOST_CHRONO_DURATION   "Second template parameter of time_point must be a boost::chrono::duration"