X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/a83971b64b0b20f6774cf3ccedd05202ad0bdb0e..27e903c56380abcb11b5a0b8d7ccab88a14b5cde:/lcore.pas diff --git a/lcore.pas b/lcore.pas index 0f6eaef..1a2f93c 100755 --- a/lcore.pas +++ b/lcore.pas @@ -258,18 +258,20 @@ implementation {!!! added sleep call -beware} procedure sleep(i:integer); +{$ifdef win32} +begin + windows.sleep(i); +{$else} var tv:ttimeval; begin - {$ifdef win32} - windows.sleep(i); - {$else} - tv.tv_sec := i div 1000; - tv.tv_usec := (i mod 1000) * 1000; - select(0,nil,nil,nil,@tv); - {$endif} + tv.tv_sec := i div 1000; + tv.tv_usec := (i mod 1000) * 1000; + select(0,nil,nil,nil,@tv); +{$endif} end; + destructor tlcomponent.destroy; begin disconnecttasks(self);