69 #include <string_view>
116 [[nodiscard]] std::string_view
get(
const char* format =
"%02d-%02d %02d:%02d:%02d.%03d",
bool use_utc =
false);
119 void format_full_timestamp(
const char* format, std::chrono::system_clock::time_point now,
bool use_utc,
int ms);
121 void update_milliseconds(
int ms);
123 alignas(64) std::atomic<int64_t> last_sec_{0};
126 size_t buffer_len_{0};
127 size_t ms_offset_{0};
Mutable cached generator for short formatted timestamps.
Definition: cached_timestamp.h:85
std::string_view get(const char *format="%02d-%02d %02d:%02d:%02d.%03d", bool use_utc=false)
Returns a view of the current formatted timestamp.
~CachedTimestamp()
Destructor.
CachedTimestamp()
Constructs the generator with an empty internal cache.
Cross-platform macros for visibility, branch hints, copy prevention, singletons and string helpers.
#define VLINK_EXPORT
Definition: macros.h:81