26#include <fmt/chrono.h>
27#include <fmt/format.h>
29#include "num_collect/impl/num_collect_export.h"
47 time_stamp(std::time_t seconds, std::uint32_t nanoseconds)
noexcept;
54 [[nodiscard]]
auto seconds() const noexcept ->
std::time_t;
61 [[nodiscard]] auto nanoseconds() const noexcept ->
std::uint32_t;
75 std::uint32_t nanoseconds_;
94 constexpr auto parse(format_parse_context& context)
95 ->
decltype(context.begin()) {
108 const auto time_tm = fmt::gmtime(val.
seconds());
109 return fmt::format_to(context.out(), FMT_STRING(
"{0:%FT%T}.{1:09d}"),
auto seconds() const noexcept -> std::time_t
Get the number of seconds from the epoch.
time_stamp(std::time_t seconds, std::uint32_t nanoseconds) noexcept
Constructor.
auto nanoseconds() const noexcept -> std::uint32_t
Get the number of nanoseconds from the time specified by seconds.
Namespace of fmt library.
Namespace of num_collect source codes.