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

Re: Idle func -> 100% CPU usage



On Sun, 27 Jun 1999 21:19:30 -0400 (EDT), Christopher T. Lansdown wrote:
>      You might consider using a gtk_timeout function, basically a timer
> but it only runs while the gtk even loop is running.  You could set
> it to whatever you want 20ms say, and thus it will call your function
> every 20ms while the gtk main event loop is running.  This way all gtk
> stuff will be serviced prettymuch normally with nearly top priority, and
> you will pretty frequently call your tk function.

Be careful with choosing timeout times: My experience is that a timeout
shorter than 2ms also uses 100% CPU time.


Erik

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2785859  Fax: +31-15-2781843  Email J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/




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