This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Manual announce and tracker update

Tags: None
(comma "," separated)
Nikolay
Registered Member
Posts
33
Karma
0

Manual announce and tracker update

Tue Nov 01, 2005 5:57 pm
After manual announce displayed time for the next update become incorrect.
When manual announce is performed and the data from tracker is received
the function Tracker::setInterval change update_timer, but doesn't change
time_of_last_update.
George
Moderator
Posts
5421
Karma
1

Tue Nov 01, 2005 6:55 pm
We don't count manual updates, they are not part of the normal update cycle.
Nikolay
Registered Member
Posts
33
Karma
0

Tue Nov 01, 2005 7:12 pm
We don't count manual updates, they are not part of the normal update cycle.


Yes, but the result from a manual update is same as from a cyclic update.
HTTPTracker::updateData invoke void Tracker::setInterval(Uint32 secs)
and as a result the cycle is broken - update_timer.changeInterval(1000*secs);
Nikolay
Registered Member
Posts
33
Karma
0

Tue Nov 01, 2005 7:38 pm
By the way, why we don't count manual updates as normal updates?


About displayed time for the next update and the real time for update -
they are not enought consistent.
time_of_last_update is set before request to the tracker but
update_timer is set after receiving the result.

The differance between them will be equal to the time for receiving an
answer from the tracker.
George
Moderator
Posts
5421
Karma
1

Wed Nov 02, 2005 8:34 am
update_timer is just a QTimer which emits a signal every X milliseconds, if we change the interval that doesn't restart the timer (unless I'm totally mistaken here)
George
Moderator
Posts
5421
Karma
1

Wed Nov 02, 2005 8:43 am
Ignore that my last post, it seems that QTimer::changeInterval does restart the timer.

http://doc.trolltech.com/3.3/qtimer.html#changeInterval

We will have to fix it then.
George
Moderator
Posts
5421
Karma
1

Thu Nov 03, 2005 8:22 pm
Should be fixed now, if we change the interval we update the time_of_last_update value.


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], Google [Bot], Sogou [Bot]