On Wed, Dec 21, 2011 at 5:46 PM, Henry Vermaak <henry.verm...@gmail.com> wrote: > You're still "guessing" a timer interval of 10ms to add to the timer if the > select() doesn't time out. So your error can be as much as 990ms per > iteration of the loop. So much for precision then.
select() doesn't seam to return how much time has passed, so how do you expect me to know the value when the only thing FPC offers for time counting is Now() and each UNIX goes a wildly different way about this? I tried to implement GetTickCount as a first step to at least basic time counting support in FPC outside Now, but it was quite hard and I don't care about timer precision that much. If you need a precise TTimer in X11, maybe you could try to implement GetTickCount and GetMillisecondCount. I'd merge the implementation to lazutils, which already has a GetTickCount waiting for a proper UNIX implementation and then I could use it to implement a precise TTimer support in LCL-CustomDrawn-X11. If not, then it will stay like it is now until someone sends a patch to improve it. -- Felipe Monteiro de Carvalho _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal