procedure warte(t: longint); var a: longint; begin a := GetTickCount; repeat Application.ProcessMessages; until (GetTickCount > a+t); end;