tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
duration_values.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_CHRONO_DURATION_VALUES_HPP
4#define TETL_CHRONO_DURATION_VALUES_HPP
5
7
8namespace etl::chrono {
9
18template <typename Rep>
20public:
22 [[nodiscard]] static constexpr auto zero() -> Rep { return Rep{}; }
23
25 [[nodiscard]] static constexpr auto min() -> Rep { return etl::numeric_limits<Rep>::lowest(); }
26
28 [[nodiscard]] static constexpr auto max() -> Rep { return etl::numeric_limits<Rep>::max(); }
29};
30
31} // namespace etl::chrono
32
33#endif // TETL_CHRONO_DURATION_VALUES_HPP
Definition abs.hpp:11
The etl::chrono::duration_values type defines three common durations.
Definition duration_values.hpp:19
static constexpr auto max() -> Rep
Returns the special duration value max.
Definition duration_values.hpp:28
static constexpr auto min() -> Rep
Returns the smallest possible representation.
Definition duration_values.hpp:25
static constexpr auto zero() -> Rep
Returns a zero-length representation.
Definition duration_values.hpp:22
static constexpr auto max() noexcept
Definition numeric_limits.hpp:21
static constexpr auto lowest() noexcept
Definition numeric_limits.hpp:22