On 24/01/18 16:15, AlexeyT wrote:
In Lazarus component EControl I call Sleep(30) to wait when timer tick
work is done.
while FBusy do Sleep(30);
and app loops forever now in sleep().
procedure Sleep(milliseconds: Cardinal);Var timeout,timeoutresult :
TTimespec; res: cint;begin timeout.tv_sec:=milliseconds div 1000;
timeout.tv_nsec:=1000*1000*(milliseconds mod 1000); repeat
res:=fpnanosleep(@timeout,@timeoutresult); timeout:=timeoutresult;
until (res<>-1) or (fpgeterrno<>ESysEINTR);end;
It is fpc 3.0.2. IDE Lazarus shows long loop inside this 'repeat'. i
waited 10-20seconds.
What happens if you put an Application.ProcessMessages in there?
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal