Advertisement
WarPie90

Untitled

May 15th, 2016
433
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.32 KB | None | 0 0
  1. function TRSChooseOption.IsClosed(maxWaitTime:Int32=-1; IntervalMS:Int32=25): Boolean;
  2. var t:UInt64;
  3. begin
  4.   if maxWaitTime < 0 then
  5.     maxWaitTime := Random(1500,2500);
  6.   t := GetTickCount64() + maxWaitTime;
  7.   while self.IsOpen(1) and (GetTickCount64() < t) do
  8.     Wait(IntervalMS);
  9.   Result := not(self.IsOpen(1));
  10. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement