void set_time_point(const fc::time_point& t) { auto micro_since_epoch = t.time_since_epoch(); auto msec_since_epoch = micro_since_epoch.count() / 1000; slot = ( msec_since_epoch - EpochMs ) / IntervalMs; }
void start_simulated_time( const fc::time_point sim_time ) { simulated_time = sim_time.sec_since_epoch(); adjusted_time_sec = 0; }
inline void pack( Stream& s, const fc::time_point& tp ) { uint64_t usec = tp.time_since_epoch().count(); s.write( (const char*)&usec, sizeof(usec) ); }
time_point_sec operator = ( const fc::time_point& t ) { utc_seconds = t.time_since_epoch().count() / 1000000ll; return *this; }
void advance_simulated_time_to( const fc::time_point sim_time ) { simulated_time = sim_time.sec_since_epoch(); adjusted_time_sec = 0; }