Example #1
0
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;
        }
    }
}
Example #2
0
bool operator>=(const Milliseconds& m, int v)
{
    return m.getTime() >= v;
}
Example #3
0
bool operator<(const Milliseconds& m, int v)
{
    return m.getTime() < v;
}