SWC-DB  v0.5.12 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
SWC::Time Namespace Reference

The SWC-DB Date and Time C++ namespace 'SWC::Time'. More...

Classes

struct  Measure
 

Typedefs

typedef Measure< std::chrono::steady_clock, std::chrono::nanoseconds > Measure_ns
 
typedef Measure< std::chrono::steady_clock, std::chrono::microseconds > Measure_us
 
typedef Measure< std::chrono::steady_clock, std::chrono::milliseconds > Measure_ms
 
typedef Measure< std::chrono::steady_clock, std::chrono::seconds > Measure_sec
 

Functions

SWC_CAN_INLINE int64_t now_ms () noexcept
 
SWC_CAN_INLINE int64_t now_ns () noexcept
 
int64_t parse_ns (int &err, const std::string &buf)
 
std::string fmt_ns (int64_t ns)
 
SWC_CAN_INLINE int64_t parse_digit (int &err, const char **bufp, int8_t default_v=0) noexcept
 

Detailed Description

The SWC-DB Date and Time C++ namespace 'SWC::Time'.

Typedef Documentation

◆ Measure_ms

typedef Measure<std::chrono::steady_clock, std::chrono::milliseconds> SWC::Time::Measure_ms

Definition at line 85 of file Time.h.

◆ Measure_ns

typedef Measure<std::chrono::steady_clock, std::chrono::nanoseconds> SWC::Time::Measure_ns

Definition at line 81 of file Time.h.

◆ Measure_sec

typedef Measure<std::chrono::steady_clock, std::chrono::seconds> SWC::Time::Measure_sec

Definition at line 87 of file Time.h.

◆ Measure_us

typedef Measure<std::chrono::steady_clock, std::chrono::microseconds> SWC::Time::Measure_us

Definition at line 83 of file Time.h.

Function Documentation

◆ fmt_ns()

std::string SWC::Time::fmt_ns ( int64_t  ns)

Definition at line 133 of file Time.cc.

References SWC::Core::to_string().

Referenced by SWC::DB::Cells::Cell::display(), and SWC::DB::Cells::Cell::print().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ now_ms()

◆ now_ns()

◆ parse_digit()

SWC_CAN_INLINE int64_t SWC::Time::parse_digit ( int &  err,
const char **  bufp,
int8_t  default_v = 0 
)
noexcept

Definition at line 21 of file Time.cc.

Referenced by parse_ns().

+ Here is the caller graph for this function:

◆ parse_ns()

int64_t SWC::Time::parse_ns ( int &  err,
const std::string &  buf 
)

Definition at line 37 of file Time.cc.

References parse_digit().

Referenced by SWC::Utils::shell::Statistics::read(), SWC::client::SQL::QuerySelect::read_cells_interval(), SWC::client::SQL::QuerySelect::read_timestamp(), and SWC::client::SQL::Reader::read_ts_and_value().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: