* Correctly close IFDEF block

This commit is contained in:
Michaël Van Canneyt 2023-11-11 17:57:53 +01:00
parent f2372c0c0a
commit 81925b7c1b

View File

@ -636,6 +636,19 @@ begin
end;
{$ENDIF WAITLOOP}
procedure MSecsFromNow (tNow : Timeval; aTimeout : Integer; out tfuture: TTimespec);
var
td,tm : integer;
begin
td:=aTimeout div 1000;
tm:=aTimeout mod 1000;
tfuture.tv_sec:=tnow.tv_sec+td;
tfuture.tv_nsec:=tnow.tv_usec*1000+(tm*1000*1000);
end;
{$ENDIF UNIX}
{ ---------------------------------------------------------------------
TSemaphore
---------------------------------------------------------------------}
@ -709,19 +722,6 @@ begin
end;
procedure MSecsFromNow (tNow : Timeval; aTimeout : Integer; out tfuture: TTimespec);
var
td,tm : integer;
begin
td:=aTimeout div 1000;
tm:=aTimeout mod 1000;
tfuture.tv_sec:=tnow.tv_sec+td;
tfuture.tv_nsec:=tnow.tv_usec*1000+(tm*1000*1000);
end;
{$ENDIF UNIX}
function TSemaphore.WaitFor(aTimeout: Cardinal = INFINITE): TWaitResult;