std::chrono::hh_mm_ss<Duration>:: is_negative, std::chrono::hh_mm_ss<Duration>:: hours, std::chrono::hh_mm_ss<Duration>:: minutes, std::chrono::hh_mm_ss<Duration>:: seconds, std::chrono::hh_mm_ss<Duration>:: subseconds
From cppreference.net
|
constexpr
bool
is_negative
(
)
const
noexcept
;
|
(1) | |
|
constexpr
std::
chrono
::
hours
hours
(
)
const
noexcept
;
|
(2) | |
|
constexpr
std::
chrono
::
minutes
minutes
(
)
const
noexcept
;
|
(3) | |
|
constexpr
std::
chrono
::
seconds
seconds
(
)
const
noexcept
;
|
(4) | |
|
constexpr
precision subseconds
(
)
const
noexcept
;
|
(5) | |
获取存储的“分解”时间组件。
返回值
设
d
为所表示的时长:
1)
true
若
d
为负数,
false
否则。
2)
std::
chrono
::
duration_cast
<
std::
chrono
::
hours
>
(
abs
(
d
)
)
3)
std::
chrono
::
duration_cast
<
std::
chrono
::
minutes
>
(
abs
(
d
)
-
hours
(
)
)
4)
std::
chrono
::
duration_cast
<
std::
chrono
::
seconds
>
(
abs
(
d
)
-
hours
(
)
-
minutes
(
)
)
5)
abs
(
d
)
-
hours
(
)
-
minutes
(
)
-
seconds
(
)
若
std::
chrono
::
treat_as_floating_point_v
<
precision
::
rep
>
为
true
;否则为
std::
chrono
::
duration_cast
<
precision
>
(
abs
(
d
)
-
hours
(
)
-
minutes
(
)
-
seconds
(
)
)
。
示例
|
本节内容不完整
原因:缺少示例 |