Re: redraw, who (xlib/cairo), when...

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

 



Hi Glynn and other guys,
>>                 while(XPending(dpy)==0){
>>                         usleep(100);
>>                         updateClock(&myClock);
>>
>
>Ugh. This causes the process to be scheduled up to 10,000 times per
>second, which is almost a busy wait. I would expect this process to
>consume far more CPU than is necessary.
do you mix up with nanosleep() (http://linux.die.net/man/3/usleep)? so, if I right, I have settled the sleep time at 0.1s (jwm uses the frequency of the microprocessor to set the sleep time). When I wrote this I expected to get something who works. I will try with select() or poll() as you suggested, it sound better.

thx,
-Nicoo

_______________________________________________
xorg@xxxxxxxxxxx: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: list-xorg@xxxxxxxxxxx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [X Forum]     [Intel Graphics]     [AMD Graphics]     [Nouveau Driver]     [XFree86]     [XFree86 Newbie]     [IETF Annouce]     [Security]     [Fontconfig]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Video for Linux]     [Linux RAID]

  Powered by Linux