29 #ifndef _GLIBCXX_CHRONO
30 #define _GLIBCXX_CHRONO 1
32 #pragma GCC system_header
34 #if __cplusplus < 201103L
44 #ifdef _GLIBCXX_USE_C99_STDINT_TR1
46 namespace std _GLIBCXX_VISIBILITY(default)
61 _GLIBCXX_BEGIN_NAMESPACE_VERSION
63 template<
typename _Rep,
typename _Period = ratio<1>>
66 template<
typename _Clock,
typename _Dur =
typename _Clock::duration>
69 _GLIBCXX_END_NAMESPACE_VERSION
72 _GLIBCXX_BEGIN_NAMESPACE_VERSION
76 template<
typename _CT,
typename _Period1,
typename _Period2>
77 struct __duration_common_type_wrapper
80 typedef __static_gcd<_Period1::num, _Period2::num> __gcd_num;
81 typedef __static_gcd<_Period1::den, _Period2::den> __gcd_den;
82 typedef typename _CT::type __cr;
83 typedef ratio<__gcd_num::value,
84 (_Period1::den / __gcd_den::value) * _Period2::den> __r;
86 typedef __success_type<chrono::duration<__cr, __r>> type;
89 template<
typename _Period1,
typename _Period2>
90 struct __duration_common_type_wrapper<__failure_type, _Period1, _Period2>
91 {
typedef __failure_type type; };
93 template<
typename _Rep1,
typename _Period1,
typename _Rep2,
typename _Period2>
94 struct common_type<chrono::duration<_Rep1, _Period1>,
95 chrono::duration<_Rep2, _Period2>>
96 :
public __duration_common_type_wrapper<typename __member_type_wrapper<
97 common_type<_Rep1, _Rep2>>::type, _Period1, _Period2>::type
102 template<
typename _CT,
typename _Clock>
103 struct __timepoint_common_type_wrapper
105 typedef __success_type<chrono::time_point<_Clock, typename _CT::type>>
109 template<
typename _Clock>
110 struct __timepoint_common_type_wrapper<__failure_type, _Clock>
111 {
typedef __failure_type type; };
113 template<
typename _Clock,
typename _Duration1,
typename _Duration2>
114 struct common_type<chrono::time_point<_Clock, _Duration1>,
115 chrono::time_point<_Clock, _Duration2>>
116 :
public __timepoint_common_type_wrapper<typename __member_type_wrapper<
117 common_type<_Duration1, _Duration2>>::type, _Clock>::type
120 _GLIBCXX_END_NAMESPACE_VERSION
124 _GLIBCXX_BEGIN_NAMESPACE_VERSION
127 template<
typename _ToDur,
typename _CF,
typename _CR,
128 bool _NumIsOne =
false,
bool _DenIsOne =
false>
129 struct __duration_cast_impl
131 template<
typename _Rep,
typename _Period>
132 static constexpr _ToDur
133 __cast(
const duration<_Rep, _Period>& __d)
135 typedef typename _ToDur::rep __to_rep;
136 return _ToDur(static_cast<__to_rep>(static_cast<_CR>(__d.count())
137 * static_cast<_CR>(_CF::num)
138 /
static_cast<_CR
>(_CF::den)));
142 template<
typename _ToDur,
typename _CF,
typename _CR>
143 struct __duration_cast_impl<_ToDur, _CF, _CR, true, true>
145 template<
typename _Rep,
typename _Period>
146 static constexpr _ToDur
147 __cast(
const duration<_Rep, _Period>& __d)
149 typedef typename _ToDur::rep __to_rep;
150 return _ToDur(static_cast<__to_rep>(__d.count()));
154 template<
typename _ToDur,
typename _CF,
typename _CR>
155 struct __duration_cast_impl<_ToDur, _CF, _CR, true, false>
157 template<
typename _Rep,
typename _Period>
158 static constexpr _ToDur
159 __cast(
const duration<_Rep, _Period>& __d)
161 typedef typename _ToDur::rep __to_rep;
162 return _ToDur(static_cast<__to_rep>(
163 static_cast<_CR>(__d.count()) / static_cast<_CR>(_CF::den)));
167 template<
typename _ToDur,
typename _CF,
typename _CR>
168 struct __duration_cast_impl<_ToDur, _CF, _CR, false, true>
170 template<
typename _Rep,
typename _Period>
171 static constexpr _ToDur
172 __cast(
const duration<_Rep, _Period>& __d)
174 typedef typename _ToDur::rep __to_rep;
175 return _ToDur(static_cast<__to_rep>(
176 static_cast<_CR>(__d.count()) * static_cast<_CR>(_CF::num)));
180 template<
typename _Tp>
185 template<
typename _Rep,
typename _Period>
186 struct __is_duration<duration<_Rep, _Period>>
191 template<
typename _ToDur,
typename _Rep,
typename _Period>
192 constexpr
typename enable_if<__is_duration<_ToDur>::value,
196 typedef typename _ToDur::period __to_period;
197 typedef typename _ToDur::rep __to_rep;
199 typedef typename common_type<__to_rep, _Rep, intmax_t>::type
201 typedef __duration_cast_impl<_ToDur, __cf, __cr,
202 __cf::num == 1, __cf::den == 1> __dc;
203 return __dc::__cast(__d);
207 template<
typename _Rep>
212 #if __cplusplus > 201402L
213 template <
typename _Rep>
214 inline constexpr
bool treat_as_floating_point_v =
218 #if __cplusplus >= 201703L
219 # define __cpp_lib_chrono 201611
221 template<
typename _ToDur,
typename _Rep,
typename _Period>
222 constexpr enable_if_t<__is_duration<_ToDur>::value, _ToDur>
227 return __to - _ToDur{1};
231 template<
typename _ToDur,
typename _Rep,
typename _Period>
232 constexpr enable_if_t<__is_duration<_ToDur>::value, _ToDur>
233 ceil(
const duration<_Rep, _Period>& __d)
237 return __to + _ToDur{1};
241 template <
typename _ToDur,
typename _Rep,
typename _Period>
242 constexpr enable_if_t<
243 __and_<__is_duration<_ToDur>,
244 __not_<treat_as_floating_point<typename _ToDur::rep>>>::value,
246 round(
const duration<_Rep, _Period>& __d)
248 _ToDur __t0 = chrono::floor<_ToDur>(__d);
249 _ToDur __t1 = __t0 + _ToDur{1};
250 auto __diff0 = __d - __t0;
251 auto __diff1 = __t1 - __d;
252 if (__diff0 == __diff1)
254 if (__t0.count() & 1)
258 else if (__diff0 < __diff1)
263 template<
typename _Rep,
typename _Period>
265 enable_if_t<numeric_limits<_Rep>::is_signed, duration<_Rep, _Period>>
266 abs(duration<_Rep, _Period> __d)
268 if (__d >= __d.zero())
275 template<
typename _Rep>
278 static constexpr _Rep
282 static constexpr _Rep
286 static constexpr _Rep
291 template<
typename _Tp>
296 template<
intmax_t _Num,
intmax_t _Den>
297 struct __is_ratio<
ratio<_Num, _Den>>
302 template<
typename _Rep,
typename _Period>
306 typedef _Period period;
308 static_assert(!__is_duration<_Rep>::value,
"rep cannot be a duration");
309 static_assert(__is_ratio<_Period>::value,
310 "period must be a specialization of ratio");
311 static_assert(_Period::num > 0,
"period must be positive");
314 constexpr duration() =
default;
319 duration(
const duration&) =
default;
323 template<
typename _Rep2,
typename =
typename
324 enable_if<is_convertible<const _Rep2&, rep>::value
325 && (treat_as_floating_point<rep>::value
326 || !treat_as_floating_point<_Rep2>::value)>::type>
327 constexpr
explicit duration(
const _Rep2& __rep)
328 : __r(static_cast<rep>(__rep)) { }
330 template<
typename _Rep2,
typename _Period2,
typename =
typename
331 enable_if<treat_as_floating_point<rep>::value
332 || (ratio_divide<_Period2, period>::den == 1
333 && !treat_as_floating_point<_Rep2>::value)>::type>
334 constexpr duration(
const duration<_Rep2, _Period2>& __d)
335 : __r(duration_cast<duration>(__d).count()) { }
337 ~duration() =
default;
338 duration& operator=(
const duration&) =
default;
352 {
return duration(-__r); }
354 _GLIBCXX17_CONSTEXPR duration&
361 _GLIBCXX17_CONSTEXPR duration
363 {
return duration(__r++); }
365 _GLIBCXX17_CONSTEXPR duration&
372 _GLIBCXX17_CONSTEXPR duration
374 {
return duration(__r--); }
376 _GLIBCXX17_CONSTEXPR duration&
377 operator+=(
const duration& __d)
383 _GLIBCXX17_CONSTEXPR duration&
384 operator-=(
const duration& __d)
390 _GLIBCXX17_CONSTEXPR duration&
391 operator*=(
const rep& __rhs)
397 _GLIBCXX17_CONSTEXPR duration&
398 operator/=(
const rep& __rhs)
405 template<
typename _Rep2 = rep>
407 typename enable_if<!treat_as_floating_point<_Rep2>::value,
409 operator%=(
const rep& __rhs)
415 template<
typename _Rep2 = rep>
417 typename enable_if<!treat_as_floating_point<_Rep2>::value,
419 operator%=(
const duration& __d)
426 static constexpr duration
428 {
return duration(duration_values<rep>::zero()); }
430 static constexpr duration
434 static constexpr duration
442 template<
typename _Rep1,
typename _Period1,
443 typename _Rep2,
typename _Period2>
444 constexpr
typename common_type<duration<_Rep1, _Period1>,
445 duration<_Rep2, _Period2>>::type
446 operator+(
const duration<_Rep1, _Period1>& __lhs,
447 const duration<_Rep2, _Period2>& __rhs)
449 typedef duration<_Rep1, _Period1> __dur1;
450 typedef duration<_Rep2, _Period2> __dur2;
451 typedef typename common_type<__dur1,__dur2>::type __cd;
452 return __cd(__cd(__lhs).count() + __cd(__rhs).count());
455 template<
typename _Rep1,
typename _Period1,
456 typename _Rep2,
typename _Period2>
457 constexpr
typename common_type<duration<_Rep1, _Period1>,
458 duration<_Rep2, _Period2>>::type
459 operator-(
const duration<_Rep1, _Period1>& __lhs,
460 const duration<_Rep2, _Period2>& __rhs)
462 typedef duration<_Rep1, _Period1> __dur1;
463 typedef duration<_Rep2, _Period2> __dur2;
464 typedef typename common_type<__dur1,__dur2>::type __cd;
465 return __cd(__cd(__lhs).count() - __cd(__rhs).count());
472 template<
typename _Rep1,
typename _Rep2,
bool =
473 is_convertible<
const _Rep2&,
474 typename common_type<_Rep1, _Rep2>::type>::value>
475 struct __common_rep_type { };
477 template<
typename _Rep1,
typename _Rep2>
478 struct __common_rep_type<_Rep1, _Rep2, true>
479 {
typedef typename common_type<_Rep1, _Rep2>::type type; };
481 template<
typename _Rep1,
typename _Period,
typename _Rep2>
483 duration<typename __common_rep_type<_Rep1, _Rep2>::type, _Period>
484 operator*(
const duration<_Rep1, _Period>& __d,
const _Rep2& __s)
486 typedef duration<typename common_type<_Rep1, _Rep2>::type, _Period>
488 return __cd(__cd(__d).count() * __s);
491 template<
typename _Rep1,
typename _Rep2,
typename _Period>
493 duration<typename __common_rep_type<_Rep2, _Rep1>::type, _Period>
494 operator*(
const _Rep1& __s,
const duration<_Rep2, _Period>& __d)
495 {
return __d * __s; }
497 template<
typename _Rep1,
typename _Period,
typename _Rep2>
498 constexpr duration<
typename __common_rep_type<_Rep1,
typename
499 enable_if<!__is_duration<_Rep2>::value, _Rep2>::type>::type, _Period>
500 operator/(
const duration<_Rep1, _Period>& __d,
const _Rep2& __s)
502 typedef duration<typename common_type<_Rep1, _Rep2>::type, _Period>
504 return __cd(__cd(__d).count() / __s);
507 template<
typename _Rep1,
typename _Period1,
508 typename _Rep2,
typename _Period2>
509 constexpr
typename common_type<_Rep1, _Rep2>::type
510 operator/(
const duration<_Rep1, _Period1>& __lhs,
511 const duration<_Rep2, _Period2>& __rhs)
513 typedef duration<_Rep1, _Period1> __dur1;
514 typedef duration<_Rep2, _Period2> __dur2;
515 typedef typename common_type<__dur1,__dur2>::type __cd;
516 return __cd(__lhs).count() / __cd(__rhs).count();
520 template<
typename _Rep1,
typename _Period,
typename _Rep2>
521 constexpr duration<
typename __common_rep_type<_Rep1,
typename
522 enable_if<!__is_duration<_Rep2>::value, _Rep2>::type>::type, _Period>
523 operator%(
const duration<_Rep1, _Period>& __d,
const _Rep2& __s)
525 typedef duration<typename common_type<_Rep1, _Rep2>::type, _Period>
527 return __cd(__cd(__d).count() % __s);
530 template<
typename _Rep1,
typename _Period1,
531 typename _Rep2,
typename _Period2>
532 constexpr
typename common_type<duration<_Rep1, _Period1>,
533 duration<_Rep2, _Period2>>::type
534 operator%(
const duration<_Rep1, _Period1>& __lhs,
535 const duration<_Rep2, _Period2>& __rhs)
537 typedef duration<_Rep1, _Period1> __dur1;
538 typedef duration<_Rep2, _Period2> __dur2;
539 typedef typename common_type<__dur1,__dur2>::type __cd;
540 return __cd(__cd(__lhs).count() % __cd(__rhs).count());
544 template<
typename _Rep1,
typename _Period1,
545 typename _Rep2,
typename _Period2>
547 operator==(
const duration<_Rep1, _Period1>& __lhs,
548 const duration<_Rep2, _Period2>& __rhs)
550 typedef duration<_Rep1, _Period1> __dur1;
551 typedef duration<_Rep2, _Period2> __dur2;
552 typedef typename common_type<__dur1,__dur2>::type __ct;
553 return __ct(__lhs).count() == __ct(__rhs).count();
556 template<
typename _Rep1,
typename _Period1,
557 typename _Rep2,
typename _Period2>
559 operator<(const duration<_Rep1, _Period1>& __lhs,
560 const duration<_Rep2, _Period2>& __rhs)
562 typedef duration<_Rep1, _Period1> __dur1;
563 typedef duration<_Rep2, _Period2> __dur2;
564 typedef typename common_type<__dur1,__dur2>::type __ct;
565 return __ct(__lhs).count() < __ct(__rhs).count();
568 template<
typename _Rep1,
typename _Period1,
569 typename _Rep2,
typename _Period2>
571 operator!=(
const duration<_Rep1, _Period1>& __lhs,
572 const duration<_Rep2, _Period2>& __rhs)
573 {
return !(__lhs == __rhs); }
575 template<
typename _Rep1,
typename _Period1,
576 typename _Rep2,
typename _Period2>
578 operator<=(const duration<_Rep1, _Period1>& __lhs,
579 const duration<_Rep2, _Period2>& __rhs)
580 {
return !(__rhs < __lhs); }
582 template<
typename _Rep1,
typename _Period1,
583 typename _Rep2,
typename _Period2>
585 operator>(
const duration<_Rep1, _Period1>& __lhs,
586 const duration<_Rep2, _Period2>& __rhs)
587 {
return __rhs < __lhs; }
589 template<
typename _Rep1,
typename _Period1,
590 typename _Rep2,
typename _Period2>
592 operator>=(
const duration<_Rep1, _Period1>& __lhs,
593 const duration<_Rep2, _Period2>& __rhs)
594 {
return !(__lhs < __rhs); }
615 template<
typename _Clock,
typename _Dur>
618 typedef _Clock clock;
620 typedef typename duration::rep rep;
621 typedef typename duration::period period;
623 constexpr
time_point() : __d(duration::zero())
626 constexpr
explicit time_point(
const duration& __dur)
631 template<
typename _Dur2,
632 typename = _Require<is_convertible<_Dur2, _Dur>>>
634 : __d(__t.time_since_epoch())
639 time_since_epoch()
const
643 _GLIBCXX17_CONSTEXPR time_point&
650 _GLIBCXX17_CONSTEXPR time_point&
658 static constexpr time_point
662 static constexpr time_point
671 template<
typename _ToDur,
typename _Clock,
typename _Dur>
672 constexpr
typename enable_if<__is_duration<_ToDur>::value,
673 time_point<_Clock, _ToDur>>::type
677 return __time_point(duration_cast<_ToDur>(__t.time_since_epoch()));
680 #if __cplusplus > 201402L
681 template<
typename _ToDur,
typename _Clock,
typename _Dur>
683 enable_if_t<__is_duration<_ToDur>::value, time_point<_Clock, _ToDur>>
684 floor(
const time_point<_Clock, _Dur>& __tp)
686 return time_point<_Clock, _ToDur>{
687 chrono::floor<_ToDur>(__tp.time_since_epoch())};
690 template<
typename _ToDur,
typename _Clock,
typename _Dur>
692 enable_if_t<__is_duration<_ToDur>::value, time_point<_Clock, _ToDur>>
693 ceil(
const time_point<_Clock, _Dur>& __tp)
695 return time_point<_Clock, _ToDur>{
696 chrono::ceil<_ToDur>(__tp.time_since_epoch())};
699 template<
typename _ToDur,
typename _Clock,
typename _Dur>
700 constexpr enable_if_t<
701 __and_<__is_duration<_ToDur>,
702 __not_<treat_as_floating_point<typename _ToDur::rep>>>::value,
703 time_point<_Clock, _ToDur>>
704 round(
const time_point<_Clock, _Dur>& __tp)
706 return time_point<_Clock, _ToDur>{
707 chrono::round<_ToDur>(__tp.time_since_epoch())};
711 template<
typename _Clock,
typename _Dur1,
712 typename _Rep2,
typename _Period2>
713 constexpr time_point<_Clock,
714 typename common_type<_Dur1, duration<_Rep2, _Period2>>::type>
715 operator+(
const time_point<_Clock, _Dur1>& __lhs,
716 const duration<_Rep2, _Period2>& __rhs)
718 typedef duration<_Rep2, _Period2> __dur2;
719 typedef typename common_type<_Dur1,__dur2>::type __ct;
720 typedef time_point<_Clock, __ct> __time_point;
721 return __time_point(__lhs.time_since_epoch() + __rhs);
724 template<
typename _Rep1,
typename _Period1,
725 typename _Clock,
typename _Dur2>
726 constexpr time_point<_Clock,
727 typename common_type<duration<_Rep1, _Period1>, _Dur2>::type>
728 operator+(
const duration<_Rep1, _Period1>& __lhs,
729 const time_point<_Clock, _Dur2>& __rhs)
731 typedef duration<_Rep1, _Period1> __dur1;
732 typedef typename common_type<__dur1,_Dur2>::type __ct;
733 typedef time_point<_Clock, __ct> __time_point;
734 return __time_point(__rhs.time_since_epoch() + __lhs);
737 template<
typename _Clock,
typename _Dur1,
738 typename _Rep2,
typename _Period2>
739 constexpr time_point<_Clock,
740 typename common_type<_Dur1, duration<_Rep2, _Period2>>::type>
741 operator-(
const time_point<_Clock, _Dur1>& __lhs,
742 const duration<_Rep2, _Period2>& __rhs)
744 typedef duration<_Rep2, _Period2> __dur2;
745 typedef typename common_type<_Dur1,__dur2>::type __ct;
746 typedef time_point<_Clock, __ct> __time_point;
747 return __time_point(__lhs.time_since_epoch() -__rhs);
750 template<
typename _Clock,
typename _Dur1,
typename _Dur2>
751 constexpr
typename common_type<_Dur1, _Dur2>::type
752 operator-(
const time_point<_Clock, _Dur1>& __lhs,
753 const time_point<_Clock, _Dur2>& __rhs)
754 {
return __lhs.time_since_epoch() - __rhs.time_since_epoch(); }
756 template<
typename _Clock,
typename _Dur1,
typename _Dur2>
758 operator==(
const time_point<_Clock, _Dur1>& __lhs,
759 const time_point<_Clock, _Dur2>& __rhs)
760 {
return __lhs.time_since_epoch() == __rhs.time_since_epoch(); }
762 template<
typename _Clock,
typename _Dur1,
typename _Dur2>
764 operator!=(
const time_point<_Clock, _Dur1>& __lhs,
765 const time_point<_Clock, _Dur2>& __rhs)
766 {
return !(__lhs == __rhs); }
768 template<
typename _Clock,
typename _Dur1,
typename _Dur2>
770 operator<(const time_point<_Clock, _Dur1>& __lhs,
771 const time_point<_Clock, _Dur2>& __rhs)
772 {
return __lhs.time_since_epoch() < __rhs.time_since_epoch(); }
774 template<
typename _Clock,
typename _Dur1,
typename _Dur2>
776 operator<=(const time_point<_Clock, _Dur1>& __lhs,
777 const time_point<_Clock, _Dur2>& __rhs)
778 {
return !(__rhs < __lhs); }
780 template<
typename _Clock,
typename _Dur1,
typename _Dur2>
782 operator>(
const time_point<_Clock, _Dur1>& __lhs,
783 const time_point<_Clock, _Dur2>& __rhs)
784 {
return __rhs < __lhs; }
786 template<
typename _Clock,
typename _Dur1,
typename _Dur2>
788 operator>=(
const time_point<_Clock, _Dur1>& __lhs,
789 const time_point<_Clock, _Dur2>& __rhs)
790 {
return !(__lhs < __rhs); }
811 inline namespace _V2 {
821 typedef duration::rep rep;
822 typedef duration::period period;
826 < system_clock::duration::zero(),
827 "a clock's minimum duration cannot be less than its epoch");
829 static constexpr
bool is_steady =
false;
838 return std::time_t(duration_cast<chrono::seconds>
839 (__t.time_since_epoch()).count());
843 from_time_t(std::time_t __t) noexcept
860 typedef duration::rep rep;
861 typedef duration::period period;
864 static constexpr
bool is_steady =
true;
882 _GLIBCXX_END_NAMESPACE_VERSION
885 #if __cplusplus > 201103L
887 #define __cpp_lib_chrono_udls 201304
889 inline namespace literals
891 inline namespace chrono_literals
893 _GLIBCXX_BEGIN_NAMESPACE_VERSION
895 template<
typename _Rep,
unsigned long long _Val>
896 struct _Checked_integral_constant
899 static_assert(_Checked_integral_constant::value >= 0
900 && _Checked_integral_constant::value == _Val,
901 "literal value cannot be represented by duration type");
904 template<
typename _Dur,
char... _Digits>
905 constexpr _Dur __check_overflow()
907 using _Val = __parse_int::_Parse_int<_Digits...>;
908 using _Rep =
typename _Dur::rep;
911 using _CheckedVal = _Checked_integral_constant<_Rep, _Val::value>;
912 return _Dur{_CheckedVal::value};
915 constexpr chrono::duration<long double, ratio<3600,1>>
916 operator""h(
long double __hours)
917 {
return chrono::duration<long double, ratio<3600,1>>{__hours}; }
919 template <
char... _Digits>
924 constexpr chrono::duration<long double, ratio<60,1>>
925 operator""min(
long double __mins)
926 {
return chrono::duration<long double, ratio<60,1>>{__mins}; }
928 template <
char... _Digits>
933 constexpr chrono::duration<long double>
934 operator""s(
long double __secs)
935 {
return chrono::duration<long double>{__secs}; }
937 template <
char... _Digits>
942 constexpr chrono::duration<long double, milli>
943 operator""ms(
long double __msecs)
944 {
return chrono::duration<long double, milli>{__msecs}; }
946 template <
char... _Digits>
951 constexpr chrono::duration<long double, micro>
952 operator""us(
long double __usecs)
953 {
return chrono::duration<long double, micro>{__usecs}; }
955 template <
char... _Digits>
960 constexpr chrono::duration<long double, nano>
961 operator""ns(
long double __nsecs)
962 {
return chrono::duration<long double, nano>{__nsecs}; }
964 template <
char... _Digits>
969 _GLIBCXX_END_NAMESPACE_VERSION
975 _GLIBCXX_BEGIN_NAMESPACE_VERSION
977 using namespace literals::chrono_literals;
979 _GLIBCXX_END_NAMESPACE_VERSION
982 #endif // __cplusplus > 201103L
987 #endif //_GLIBCXX_USE_C99_STDINT_TR1
991 #endif //_GLIBCXX_CHRONO
_GLIBCXX14_CONSTEXPR const _Tp & max(const _Tp &, const _Tp &)
This does what you think it does.
complex< _Tp > operator+(const complex< _Tp > &__x, const complex< _Tp > &__y)
Return new complex value x plus y.
duration< int64_t > seconds
seconds
duration< int64_t, nano > nanoseconds
nanoseconds
duration< int64_t, ratio< 60 > > minutes
minutes
constexpr enable_if< __is_duration< _ToDur >::value, time_point< _Clock, _ToDur > >::type time_point_cast(const time_point< _Clock, _Dur > &__t)
time_point_cast
duration< int64_t, milli > milliseconds
milliseconds
complex< _Tp > operator/(const complex< _Tp > &__x, const complex< _Tp > &__y)
Return new complex value x divided by y.
typename __ratio_divide< _R1, _R2 >::type ratio_divide
ratio_divide
duration< int64_t, micro > microseconds
microseconds
complex< _Tp > operator*(const complex< _Tp > &__x, const complex< _Tp > &__y)
Return new complex value x times y.
_GLIBCXX14_CONSTEXPR const _Tp & min(const _Tp &, const _Tp &)
This does what you think it does.
static constexpr _Tp lowest() noexcept
Provides compile-time rational arithmetic.
duration< int64_t, ratio< 3600 > > hours
hours
_Tp abs(const complex< _Tp > &)
Return magnitude of z.
complex< _Tp > operator-(const complex< _Tp > &__x, const complex< _Tp > &__y)
Return new complex value x minus y.
static constexpr _Tp max() noexcept
constexpr enable_if< __is_duration< _ToDur >::value, _ToDur >::type duration_cast(const duration< _Rep, _Period > &__d)
duration_cast