In my application, I am using gobject.timeout_add to trigger periodic
updates of the status of a number of machines.

However, I am having a bit of trouble understanding exactly how the
timeout is calculated. According to the documentation:

        After each call to the timeout function, the time of the next
        timeout is recalculated based on the current time and the 
        given interval (it does not try to 'catch up' time lost in delays).

The "After each call to the timeout function,..." leads me to think
that the timer is reset when the timeout function returns. However, the
phrase "(it does not try to 'catch up' time lost in delays)." makes me
think that the timer is reset as soon as the timeout function thread is
started. (This also seems to be confirmed by tracing my code)

What I would like to happen is that the timeout gets recalculated when
my timeout function is done/returns. I guess, I could add a new timeout
from within my timeout function and have it [the timeout function]
return False (so the old timeout is destroyed) but I am thinking that
there has to be a better way to do this.

I appreciate any advice on the matter.
-- 
Mitko Haralanov
==========================================
A Fortran compiler is the hobgoblin of little minis.
_______________________________________________
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to