Hello,

I'm going to ask my question here as i couldnt find any cc++ mailing list(?) 
for 
discussing the problem. As i was coding for a small application, i realized a 
strange behaviour
of TimerPort::incTimer(RATE)...

As it's already shown in the examples of ccrtp project, the code for a receiver:

for(int i = 0 ; true ; i++) {
    // getData from incoming queue, not relevant now.
    // ...

   cout << "[BEFORE SLEEP]:\t\t" << TimerPort::getTimer() << endl;
Thread::sleep(TimerPort::getTimer()) ;
    cout << "[BEFORE INCTIMER]:\t" << TimerPort::getTimer() << endl;
TimerPort::incTimer(RATE) ;
    cout << "[END INCTIMER]:\t\t" << TimerPort::getTimer() << endl;
}

The output is:

BEFORE SLEEP]:             9
[BEFORE INCTIMER]:      0
[END INCTIMER]:          20
[BEFORE SLEEP]:          19
[BEFORE INCTIMER]:      0
[END INCTIMER]:         21
[BEFORE SLEEP]:          20
[BEFORE INCTIMER]:      0
[END INCTIMER]:           0   // according to my /usr/include/cc++/thread.h 
incTimer increments 
                                         // the (RATE) to the value what is 
left from the last setTimer()
                                        // so it must be again 20 milisecs 
(0+20 = 20 )

So my question is why does incTimer member function of TimerPort stop adding 
the (RATE) to value
after sometime? Has anyone had the same problem?

Thanx in advance (!!)







_______________________________________________
Ccrtp-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/ccrtp-devel

Reply via email to