Occasionally I get a negative "Elapsed" value using EpikTimer. Here is my code:

    RunWhile:=True;
    DelayInSeconds := 1.00; //Store every x seconds
    while RunWhile do begin
      ET.Clear;
      ET.Start;
      while (ET.Elapsed  < DelayInSeconds) and RunWhile do begin
        ET.SystemSleep(10);
        writeln('ET.Elapsed=',ET.Elapsed);
        if (ET.Elapsed < 0 ) then RunWhile:=False;
      end;
      LogOneReading(); //Store successive readings (my code)
    end;

This is the output after about 5 to 20 minutes where you can see the last
line showing the negative value:
...
ET.Elapsed= 4.4526500000000000E-0001
ET.Elapsed= 4.5535900000000000E-0001
ET.Elapsed= 4.6544100000000000E-0001
ET.Elapsed=-4.2944917280000000E+0003


I did install EpikTimer from the latest github.

I am using Linux, and had to add "linux" to the uses clause to prevent
the clock_gettime() error.


Thanks for looking,
Anthony
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to