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.com
C++
Utilities library
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Date and time utilities
| Time point | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Duration | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Clocks | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Time of day | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Calendar | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Time zone | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
chrono
I/O
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
(C++20)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| C-style date and time | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::chrono::hh_mm_ss
| Member functions | ||||
|
hh_mm_ss::is_negative
hh_mm_ss::hours
hh_mm_ss::minutes
hh_mm_ss::seconds
hh_mm_ss::subseconds
|
||||
| Non-member functions | ||||
| Helper classes | ||||
|
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) | |
Obtains the components of the stored "broken down" time.
Return value
Let
d
be the represented duration:
1)
true
if
d
is negative,
false
otherwise.
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
(
)
if
std::
chrono
::
treat_as_floating_point_v
<
precision
::
rep
>
is
true
; otherwise
std::
chrono
::
duration_cast
<
precision
>
(
abs
(
d
)
-
hours
(
)
-
minutes
(
)
-
seconds
(
)
)
.
Example
|
This section is incomplete
Reason: no example |
Retrieved from "
https://en.cppreference.com/mwiki/index.php?title=cpp/chrono/hh_mm_ss/accessors&oldid=161591
"