|
microfmt
Zero-allocation C++ formatting for constrained environments
|
Formatter for reloco::duration.
More...
#include <reloco.hpp>
Public Member Functions | |
| constexpr void | parse (format_parse_context &ctx) noexcept |
| void | format (const reloco::duration &value, const sink &out) const noexcept |
Public Attributes | |
| uint8_t | precision {9} |
| Fractional-digit precision (default 9 = nanoseconds). | |
| bool | show_unit {true} |
Set to false (via r/R) for raw seconds without s suffix. | |
Formatter for reloco::duration.
Renders sec.frac with a trailing s unit, mirroring formatters/posix_time.hpp's timespec/timeval formatters (which reloco::duration shares its (seconds, subsec_nanoseconds) representation with). Accepts the same m/3, u/6, n/9 fractional-precision suffixes and the r/R flag to suppress the trailing s unit.
|
inlinenoexcept |
|
inlineconstexprnoexcept |
| uint8_t microfmt::formatter< reloco::duration >::precision {9} |
Fractional-digit precision (default 9 = nanoseconds).
| bool microfmt::formatter< reloco::duration >::show_unit {true} |
Set to false (via r/R) for raw seconds without s suffix.