On 12/2/05, VisionForce <[EMAIL PROTECTED]> wrote: > Dim DelayAmount, DelayCount As Integer > DelayCount = 250 > > If (Environment.TickCount - DelayAmount) >= DelayCount Then > ' run code here > DelayAmount = Environment.Tick > End If
Maybe you can check TEpikTimer. I used it to get nanosecond resolution for a Digital Osciloscope project witch needed precise timing between the voltage measures. Works great on both Linux and Windows, but requires Lazarus LCL. To wait some time before continuing I write code using it like this: DelayInSeconds := 8; // or any value OldTime := ET.Elapse; while ((1000000.0 * (ET.Elapsed - OldTime) < DelayInSeconds)) do begin ET.SystemSleep(0); end; // DelayInSeconds has elapsed and now you can continue executing the code You can find more information (including download) here: http://wiki.lazarus.freepascal.org/index.php/EpikTimer#Usage I recently improved the component, and the updated version is available for download. One particular issue with it is that the component is in the standard LGPL, witch prohibits static linking between proprietary and the component, but you can contact the author if this is a problem for you. -- Felipe Monteiro de Carvalho _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel