[fpc-pascal] Timer in X11
Henry Vermaak
henry.vermaak at gmail.com
Thu Dec 22 10:50:58 CET 2011
On 22/12/11 09:15, Felipe Monteiro de Carvalho wrote:
>
> It is not about select working or not, it is about how many file
> descriptors X uses to communicate:
>
> http://fixunix.com/xwindows/91558-xconnectionnumber-select.html#post301681
>
> I don't have time in the foreseeable future to find in which wierd
> corner case XAddConnectionWatch is necessary and test that a
I already mentioned this, but perhaps you didn't read it. You don't
need to test _any_ corner cases, that's the point of
XAddConnectionWatch. You get a callback that gives you a file
descriptor which you can add/remove to the descriptors you check with
select():
http://groups.google.com/group/comp.windows.x/browse_thread/thread/cd32588d173fffcf/4b750082b055422b?q=mity&rnum=5&hl=en#4b750082b055422b
> algoritm. For me, timeouting every second is already more then good
> enough, it could even be each half second. Already at 50ms I could not
> see my application with top in the top 20 CPU users (most of which
> were using zero), so I seriously doubt the battery usage concerns
> unless someone really measures it.
Perhaps you should try powertop.
Henry
More information about the fpc-pascal
mailing list