#include <time.hpp>
Definition at line 42 of file time.hpp.
◆ time_point()
◆ from_iso_string()
Definition at line 67 of file time.cpp.
68 { try {
69 auto dot =
s.find(
'.' );
70 if( dot == std::string::npos )
72 else {
73 auto ms =
s.substr( dot );
74 ms[0] = '1';
75 while( ms.size() < 4 ) ms.push_back('0');
77 }
static time_point_sec from_iso_string(const fc::string &s)
constexpr time_point(microseconds e=microseconds())
#define FC_RETHROW_EXCEPTIONS(LOG_LEVEL, FORMAT,...)
Catchs all exception's, std::exceptions, and ... and rethrows them after appending the provided log m...
constexpr microseconds milliseconds(int64_t s)
int64_t to_int64(const fc::string &)
◆ maximum()
static constexpr time_point fc::time_point::maximum |
( |
| ) |
|
|
inlinestaticconstexpr |
Definition at line 46 of file time.hpp.
static constexpr microseconds maximum()
◆ min()
static constexpr time_point fc::time_point::min |
( |
| ) |
|
|
inlinestaticconstexpr |
◆ now()
Definition at line 14 of file time.cpp.
15 {
18 }
20 }
static fc::time_point fc_now()
constexpr const microseconds & time_since_epoch() const
◆ operator fc::string()
Definition at line 50 of file time.cpp.
51 {
57 const auto ptime = boost::posix_time::from_time_t(time_t(secs));
58 return boost::posix_time::to_iso_extended_string(ptime) + "." + padded_ms;
59 } else {
60
61
62 auto as_duration = boost::posix_time::microseconds(
count);
63 return boost::posix_time::to_iso_string(as_duration);
64 }
65 }
constexpr int64_t count() const
fc::string to_string(double)
unsigned __int64 uint64_t
◆ operator!=()
bool fc::time_point::operator!= |
( |
const time_point & | t | ) |
const |
|
inlineconstexpr |
Definition at line 59 of file time.hpp.
59{ return elapsed._count !=t.elapsed._count; }
◆ operator+()
◆ operator+=()
Definition at line 60 of file time.hpp.
60{ elapsed+=m; return *this; }
◆ operator-() [1/2]
◆ operator-() [2/2]
Definition at line 64 of file time.hpp.
64{
return microseconds(elapsed.
count() - m.elapsed.count()); }
◆ operator-=()
Definition at line 61 of file time.hpp.
61{ elapsed-=m; return *this; }
◆ operator<()
bool fc::time_point::operator< |
( |
const time_point & | t | ) |
const |
|
inlineconstexpr |
Definition at line 56 of file time.hpp.
56{ return elapsed._count < t.elapsed._count; }
◆ operator<=()
bool fc::time_point::operator<= |
( |
const time_point & | t | ) |
const |
|
inlineconstexpr |
Definition at line 57 of file time.hpp.
57{ return elapsed._count <=t.elapsed._count; }
◆ operator==()
bool fc::time_point::operator== |
( |
const time_point & | t | ) |
const |
|
inlineconstexpr |
Definition at line 58 of file time.hpp.
58{ return elapsed._count ==t.elapsed._count; }
◆ operator>()
bool fc::time_point::operator> |
( |
const time_point & | t | ) |
const |
|
inlineconstexpr |
Definition at line 54 of file time.hpp.
54{ return elapsed._count > t.elapsed._count; }
◆ operator>=()
bool fc::time_point::operator>= |
( |
const time_point & | t | ) |
const |
|
inlineconstexpr |
Definition at line 55 of file time.hpp.
55{ return elapsed._count >=t.elapsed._count; }
◆ sec_since_epoch()
uint32_t fc::time_point::sec_since_epoch |
( |
| ) |
const |
|
inlineconstexpr |
Definition at line 53 of file time.hpp.
53{
return elapsed.
count() / 1000000; }
◆ time_since_epoch()
const microseconds & fc::time_point::time_since_epoch |
( |
| ) |
const |
|
inlineconstexpr |
The documentation for this class was generated from the following files: