uses
  Crt,
  Tick,
  FstTimer;
var
  Tm  : tFstTimer;
  i   : Integer;
  y,x : Word;
begin
{  InitTick;}
  ClrScr;
  WriteLn;
  TextAttr:=$07;
  WriteLn('Test jednotky FstTimer.');
  WriteLn;
  x:=WhereX;
  y:=WhereY;
  Tm.SaveTime;
  repeat
    GotoXY(x,y);
    TextAttr:=$07;
    Write('Cas v milisec = ');
    for i:=1 to 10 do
    begin
      if Tm.TstTime(i*1000) then
        TextAttr:=$0c
      else
        TextAttr:=$09;
      Write(i*1000,'  ');
    end;
    GotoXY(X,Y+1);
    TextAttr:=$07;
    write('Uplynulo jiz ',Tm.ReadTime,' ms.');
  until Tm.TstTime(10020) or keypressed;
  TextAttr:=$07;
  GotoXY(X,Y+3);
  writeln('Test Count - testuji 10000 ms');
  tm.setcount(10000);
  writeln('Ted zacal');
  TextAttr:=$09;
  for i:=0 to 50 do
  begin
    GotoXY(i,Y+4);
    write('#');
  end;
  TextAttr:=$07;
  repeat;
    GotoXY(X,Y+5);
    writeln('Zbyva jeste ',Tm.ReadCount,' ms.    ');
    GotoXY(Round(Tm.ReadCount/200),Y+4);
    write(' ');
  until Tm.TstCount or keypressed;
  GotoXY(X,Y+6);
  writeln('Prave skoncil');
end.