• Copyrights
  • Clock::set, Modem::notify, Modem::NetTime, modem.notify(ref, _refModem)
  • Duration.count(), Duration.seconds()
  • Makefile: PYTHON environment variable?, -lrt
  • System diagram
  • NetTime
class NetTime {
  Clock::time_point _time;
  Tick _stamp;

public:
  void update(Clock::time_point time_, Tick stamp_) {
    _time = time_;
    _stamp = stamp_;
  }

  Clock::time_point time(Tick tick_) const {
    auto dt = duration_cast<Clock::duration>((tick_ - _stamp).ticks());
    return _time + Clock::time_point(dt);
  }

  NetTime() : _time(), _stamp() { }
}; // NetTime

rci::InternallyLocked<NetTime> _netTime;

void notify(Clock::time_point time_, Tick stamp_)
  { _netTime->update(time_, stamp_); }

  if (abs(_netTime->time(now()) - msg.time) > minutes(1))
    continue;
  • Remove Tx::now().