void IgmpSender::threadFunction() { Milliseconds sleepTime(SLEEP_INTERVAL); while (!_stopThread) { Milliseconds before; _igmpPacket->send(); Milliseconds after; after = after - before; int slept = after.getTime(); while (!_stopThread && slept < _interval * 1000) { sleepTime.sleep(); slept += SLEEP_INTERVAL; } } }
bool operator>=(const Milliseconds& m, int v) { return m.getTime() >= v; }
bool operator<(const Milliseconds& m, int v) { return m.getTime() < v; }