A time of day with nanosecond precision.
More...
#include <ignite_time.h>
|
| constexpr | ignite_time () noexcept=default |
| constexpr | ignite_time (std::int_fast8_t hour, std::int_fast8_t minute, std::int_fast8_t second=0, std::int32_t nano=0) |
| constexpr std::int_fast8_t | get_hour () const noexcept |
| constexpr std::int_fast8_t | get_minute () const noexcept |
| constexpr std::int_fast8_t | get_second () const noexcept |
| constexpr std::int32_t | get_nano () const noexcept |
| constexpr int | compare (const ignite_time &other) const noexcept |
A time of day with nanosecond precision.
This is modeled after java.time.LocalTime.
◆ ignite_time() [1/2]
| ignite::ignite_time::ignite_time |
( |
| ) |
|
|
constexprdefaultnoexcept |
◆ ignite_time() [2/2]
| ignite::ignite_time::ignite_time |
( |
std::int_fast8_t | hour, |
|
|
std::int_fast8_t | minute, |
|
|
std::int_fast8_t | second = 0, |
|
|
std::int32_t | nano = 0 ) |
|
inlineconstexpr |
Constructor.
- Parameters
-
| hour | Hour-of-day, from 0 to 23. |
| minute | Minute-of-hour, from 0 to 59. |
| second | Second-of-minute, from 0 to 59. |
| nano | Nano-of-second, from 0 to 999,999,999. |
◆ compare()
| int ignite::ignite_time::compare |
( |
const ignite_time & | other | ) |
const |
|
inlinenodiscardconstexprnoexcept |
compare to another value.
- Parameters
-
| other | Instance to compare to. |
- Returns
- Zero if equals, negative number if less, and positive if greater.
◆ get_hour()
| std::int_fast8_t ignite::ignite_time::get_hour |
( |
| ) |
const |
|
inlinenodiscardconstexprnoexcept |
Gets the hour-of-day field.
◆ get_minute()
| std::int_fast8_t ignite::ignite_time::get_minute |
( |
| ) |
const |
|
inlinenodiscardconstexprnoexcept |
Gets the m_minute-of-m_hour field.
◆ get_nano()
| std::int32_t ignite::ignite_time::get_nano |
( |
| ) |
const |
|
inlinenodiscardconstexprnoexcept |
Gets the nano-of-second field.
◆ get_second()
| std::int_fast8_t ignite::ignite_time::get_second |
( |
| ) |
const |
|
inlinenodiscardconstexprnoexcept |
Gets the second-of-m_minute field.
The documentation for this class was generated from the following file: