title: Creating a wait using getTickCount in Delphi
body: <p>I am creating a procedure that I need to run then wait 10 minutes before moving on </p>
  
  <pre><code>procedure firstTimeRun(const document: IHTMLDocument2);
  var
    fieldValue : string;
    StartTime : Dword;
  begin
    StartTime := GetTickCount();
    WebFormSetFieldValue(document, 0, 'Username', '*******');
    WebFormSetFieldValue(document, 0, 'Password', '*******');
    WebFormSubmit(document, 0);
   if (GetTickCount() &gt;= StartTime+ 600000) then
   begin
     SecondRun();
   end; 
   end; 
  </code></pre>
  
  <p>the problem I have is when I get to the if statement it will check see that it is not true and move on how do I make it stay and wait until the statement is true?</p>