How to create precise timeouts?



From reading the description of g_timeout_add, it seems that if I
call
    g_timeout_add(100,function,NULL)
and function itself takes 80ms to complete, this will end up in function
being started every 180ms. Is this right?

What I want is to have it beeing called about every 100ms, maybe 10ms
earlier or later but 10 times a second in the average. How do I do this
(short of resorting to the setitimer system call)?

Nils

-- 
Quotes from the net, featuring John Lapeyre[L] and Christopher F. Miller [M]:
M> I'm not sure what the right words are to describe Upside.  Last month they
M> mentioned the sendmail **web server** as an example of the failure of the
M> open source process....
L> Well, sendmail does a lousy job of serving webpages.

PGP signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]