API
Collaboration diagram for The flatlogs timestamp:

Classes

struct  flatlogs::timespecX
 A fixed-width timespec structure. More...
 

Functions

void flatlogs::timespecFromX (timespec &ts, const timespecX &tsX)
 Convert a timespecX to a native timespec. More...
 
template<clockid_t clk_id = CLOCK_REALTIME>
void flatlogs::clock_gettimeX (timespecX &tsX)
 Fill in a timespecX with the current time. More...
 

Detailed Description

Function Documentation

◆ clock_gettimeX()

template<clockid_t clk_id = CLOCK_REALTIME>
void flatlogs::clock_gettimeX ( timespecX tsX)

Fill in a timespecX with the current time.

This is based on the usual clock_gettime. clockid_t is a template parameter since we probaby always want CLOCK_REALTIME, but if we don't for some reason it will be passed in the same order as in clock_gettime.

Template Parameters
clk_idspecifies the type.
Parameters
[out]tsXthe fixed-width timespec to populate

Definition at line 378 of file timespecX.hpp.

◆ timespecFromX()

void flatlogs::timespecFromX ( timespec &  ts,
const timespecX tsX 
)
inline

Convert a timespecX to a native timespec.

Parameters
[out]tsthe native timespec to set
[in]tsXthe fixed-width timespec from which to get values

Definition at line 358 of file timespecX.hpp.