10namespace sysio {
namespace chain {
17 template<u
int16_t IntervalMs, u
int64_t EpochMs>
34 SYS_ASSERT( std::numeric_limits<uint32_t>::max() -
slot >= 1, fc::overflow_exception,
"block timestamp overflow" );
65 auto msec_since_epoch = micro_since_epoch.
count() / 1000;
66 slot = ( msec_since_epoch - EpochMs ) / IntervalMs;
71 slot = (sec_since_epoch * 1000 - EpochMs) / IntervalMs;
84 template<u
int16_t IntervalMs, u
int64_t EpochMs>
89 template<u
int16_t IntervalMs, u
int64_t EpochMs>
#define SYS_ASSERT(expr, exc_type, FORMAT,...)
constexpr int64_t count() const
constexpr uint32_t sec_since_epoch() const
constexpr const microseconds & time_since_epoch() const
stores null, int64, uint64, double, bool, string, std::vector<variant>, and variant_object's.
bool operator<(const block_timestamp &t) const
bool operator<=(const block_timestamp &t) const
static block_timestamp maximum()
block_timestamp next() const
block_timestamp(uint32_t s=0)
bool operator>(const block_timestamp &t) const
bool operator==(const block_timestamp &t) const
block_timestamp(const fc::time_point &t)
static block_timestamp min()
fc::time_point to_time_point() const
void operator=(const fc::time_point &t)
block_timestamp(const fc::time_point_sec &t)
bool operator!=(const block_timestamp &t) const
bool operator>=(const block_timestamp &t) const
Defines exception's used by fc.
constexpr microseconds milliseconds(int64_t s)
void from_variant(const fc::variant &v, sysio::chain::chain_id_type &cid)
void to_variant(const sysio::chain::shared_public_key &var, fc::variant &vo)
block_timestamp< config::block_interval_ms, config::block_timestamp_epoch > block_timestamp_type
#define FC_REFLECT(TYPE, MEMBERS)
Specializes fc::reflector for TYPE.
unsigned __int64 uint64_t
yubihsm_pkcs11_slot * slot