Re: There is a sleep() call in idGlobal!

Giganews Newsgroups
Subject: Re: There is a sleep() call in idGlobal!
Posted by:  Martin James (mjames_falc…@dial.pipex.com)
Date: Tue, 23 Mar 2004

> procedure Sleep(ATime: cardinal);
> begin
>  {$IFDEF LINUX}
>  if (not Assigned(GStack)) then begin
>    GStack := TIdStack.CreateStack;
>  end;
>  // what if the user just calls sleep? without doing anything...
>  GStack.WSSelect(nil, nil, nil, ATime);
>  {$ENDIF}
>  {$IFDEF MSWINDOWS}
>  Windows.Sleep(ATime);
>  {$ENDIF}
> end;

..on the other hand, if I'd looked more carefully at the conditionals, I
would have realised that ths proc resolves to windows.sleep anyway, so, no
problemo.

Rgds,
Martin

Replies

None

In response to

There is a sleep() call in idGlobal! posted by Martin James on Tue, 23 Mar 2004