On 21/12/11 17:00, Felipe Monteiro de Carvalho wrote:
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
select() on linux will actually modify the timeout (fpc overloads
select(), but presumably this will still happen when you use ptimeval
for the timeout). You shouldn't rely on this, though, read the man page
for more info. This is what Mark was trying to say in his reply to your
original message.
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've offered a solution in my reply to Martin Schreiber, but fpc doesn't
offer functions for posix timers. Perhaps you can check if Marco is in
a good mood? Either way you could test it first by knocking up a test in c.
Perhaps it's better to implement a thread based timer?
Henry
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal