quill
Public Member Functions | List of all members
detail::TimestampFormatter Class Reference

Formats a timestamp given a format string as a pattern. More...

#include <TimestampFormatter.h>

Public Member Functions

 TimestampFormatter (std::string time_format, Timezone timestamp_timezone=Timezone::LocalTime)
 
QUILL_NODISCARD QUILL_ATTRIBUTE_HOT std::string_view format_timestamp (std::chrono::nanoseconds time_since_epoch)
 
QUILL_NODISCARD std::string const & time_format () const noexcept
 
QUILL_NODISCARD Timezone timestamp_timezone () const noexcept
 

Detailed Description

Formats a timestamp given a format string as a pattern.

The format pattern uses the same format specifiers as strftime() but with the following additional specifiers : 1) Qms - Milliseconds 2) Qus - Microseconds 3) Qns - Nanoseconds

Note
Qms, Qus, Qns specifiers are mutually exclusive e.g. given : "%I:%M.%Qms%p" the output would be "03:21.343PM"

The documentation for this class was generated from the following file: