etl/docs/chrono/hh_mm_ss.md
John Wellbelove 09af946a8f Added more documentation for chrono classes
Updated callouts
2026-04-13 10:59:19 +02:00

1.9 KiB

title
hh_mm_ss

{{< callout type="info">}} Header: chrono.h
Since: 20.41.0
Similar to: std::chrono::hh_mm_ss {{< /callout >}}

A type to hold hours, minutes, and seconds.

template <typename TDuration>
class hh_mm_ss

Description Static asserts if TDuration is not a specialisation of etl::chrono::duration.

Constants

static constexpr int fractional_width;

Description
The number of fractional digits.

Member types

precision

Description
The return type for to_duration.

Constructors

ETL_CONSTEXPR 
hh_mm_ss() 
ETL_NOEXCEPT

Description
Default constructor.


ETL_CONSTEXPR14
explicit hh_mm_ss(TDuration d) 
ETL_NOEXCEPT

Description
Construct from duration.

Access

ETL_NODISCARD
ETL_CONSTEXPR14 
bool is_negative() const 
ETL_NOEXCEPT

Description
Checks for negative duration.


ETL_NODISCARD 
ETL_CONSTEXPR14 
etl::chrono::hours hours() const 
ETL_NOEXCEPT

Return
The hours.

ETL_NODISCARD
ETL_CONSTEXPR14 
etl::chrono::minutes minutes() const 
ETL_NOEXCEPT

Return
The minutes.


ETL_NODISCARD 
ETL_CONSTEXPR14
etl::chrono::seconds seconds() const 
ETL_NOEXCEPT

Return
The seconds.


ETL_NODISCARD
ETL_CONSTEXPR14 
precision subseconds() const 
ETL_NOEXCEPT

Return
The subseconds.


ETL_NODISCARD
ETL_CONSTEXPR14 
explicit operator precision() const 
ETL_NOEXCEPT

Return
The duration.


ETL_NODISCARD
ETL_CONSTEXPR14 
precision to_duration() const 
ETL_NOEXCEPT

Return*
The duration.

absolute

template <typename TDuration>
ETL_NODISCARD
ETL_CONSTEXPR14 
TDuration absolute(TDuration dur) 
ETL_NOEXCEPT

A specialisation of absolute for etl::chrono::duration. Return
The absolute duration value.