9 auto full_day = std::chrono::duration_cast<std::chrono::nanoseconds>(
10 std::chrono::seconds(24 * 3600));
12 if (t.ts < full_day) {
15 std::ostringstream os;
16 os <<
"out of range timestamp <" << t.ts.count() <<
"> expected value in [0," 17 << full_day.count() <<
") range";
18 throw std::range_error(os.str());
22 auto sec = std::chrono::duration_cast<std::chrono::seconds>(x.
ts);
23 auto nn = (x.
ts - sec).count();
31 return os << std::setw(2) << std::setfill(
'0') << hh << std::setw(2)
32 << std::setfill(
'0') << mm << std::setw(2) << std::setfill(
'0')
33 << ss <<
"." << std::setw(9) << std::setfill(
'0') << nn;
void check_timestamp_range< true >(timestamp const &t)
Provide an active implementation of jb::itch5::check_timestamp_range<>
Represent a ITCH-5.0 timestamp.
std::chrono::nanoseconds ts
std::ostream & operator<<(std::ostream &os, add_order_message const &x)
Streaming operator for jb::itch5::add_order_message.