lazarus/debugger/test/examples/testwait.pp
lazarus d6ea930f45 MWE:
* More delphi compatibility added/updated to TListView
  * Introduced TDebugger.locals
  * Moved breakpoints dialog to debugger dir
  * Changed breakpoints dialog to read from resource

git-svn-id: trunk@1395 -
2002-02-09 02:30:19 +00:00

44 lines
660 B
ObjectPascal

unit TestWait;
{$mode objfpc}{$H+}
interface
type
TWait = class
constructor Create(const ATime: Integer);
procedure Wait(const ATime: Integer);
end;
implementation
uses
SysUtils;
procedure Wait(const ATime: Integer);
var
time: TDateTime;
begin
time := now;
while (now - time) * SecsPerDay < ATime do;
end;
constructor TWait.Create(const ATime: Integer);
var
n: Integer;
begin
inherited Create;
n := 0;
while n < ATime do Inc(n); //something useles
end;
procedure TWait.Wait(const ATime: Integer);
begin
TestWait.Wait(ATime);
end;
var
n: Integer;
begin
n := 0;
while n < 1001 do Inc(n); //something useles
end.