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 |
typedef Measure<std::chrono::steady_clock, std::chrono::milliseconds> SWC::Time::Measure_ms |
typedef Measure<std::chrono::steady_clock, std::chrono::nanoseconds> SWC::Time::Measure_ns |
typedef Measure<std::chrono::steady_clock, std::chrono::seconds> SWC::Time::Measure_sec |
typedef Measure<std::chrono::steady_clock, std::chrono::microseconds> SWC::Time::Measure_us |
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().
|
noexcept |
Definition at line 36 of file Time.h.
Referenced by SWC::Manager::Column::apply_loaded_state(), SWC::Manager::RangersResources::check(), SWC::System::Resources::checker(), SWC::client::Schemas::clear_expired(), SWC::client::CachedRangers::clear_expired(), SWC::client::Managers::MasterRangesCache::Column::clear_expired(), SWC::Comm::Buffers::expired(), SWC::Comm::Event::expired(), SWC::client::CachedRangers::get(), SWC::client::Schemas::get(), SWC::client::Managers::MasterRangesCache::Column::get_read(), SWC::client::Managers::MasterRangesCache::Column::get_write(), SWC::Manager::Rangers::health_check_columns(), SWC::Comm::Event::received(), SWC::client::CachedRangers::set(), SWC::client::Schemas::set(), SWC::client::Managers::MasterRangesCache::Column::set(), SWC::Manager::Range::set_state_assigned(), and SWC::Manager::Range::set_state_queued().
|
noexcept |
Definition at line 43 of file Time.h.
Referenced by SWC::Ranger::CommitLog::Fragments::_next_id(), SWC::Ranger::Range::_run_add_queue(), SWC::Ranger::Block::_scan(), SWC::Ranger::BlockLoader::add(), SWC::client::Query::Profiling::Component::add(), SWC::DB::Cells::ReqScan::Profile::add_block_load(), SWC::DB::Cells::ReqScan::Profile::add_block_locate(), SWC::DB::Cells::ReqScan::Profile::add_block_scan(), SWC::Ranger::CommitLog::Fragments::commit(), SWC::Ranger::Compaction::compact(), SWC::Manager::MngdColumns::create(), SWC::DB::Cells::ReqScan::Profile::finished(), SWC::client::Query::Profiling::finished(), SWC::Ranger::CompactRange::finished(), SWC::DB::Cells::Cell::has_expired(), SWC::Ranger::CompactRange::initial_commitlog_done(), SWC::Ranger::CompactRange::initialize(), SWC::Ranger::CompactRange::is_slow_req(), SWC::client::Query::Profiling::reset(), SWC::Ranger::Range::reset_load_revision(), SWC::Ranger::CompactRange::response(), SWC::Manager::MngdColumns::run_actions(), SWC::Ranger::Blocks::scan(), SWC::Utils::LoadGenerator::select_data(), SWC::Ranger::Callback::RangeQuerySelectDeleting::update(), SWC::Ranger::Callback::RangeQuerySelectUpdating::update(), SWC::Manager::MngdColumns::update(), SWC::Utils::LoadGenerator::update_data(), and SWC::Ranger::Blocks::wait_processing().
|
noexcept |
Definition at line 21 of file Time.cc.
Referenced by 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().