home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 2 / ctrom_ii_b.zip / ctrom_ii_b / PROGRAM / PASCAL / PERFORM / TIMER.PAS < prev    next >
Pascal/Delphi Source File  |  1993-01-13  |  488b  |  22 lines

  1. {$IFDEF VER70}
  2. {$A+,B-,D-,E-,F-,G+,I-,L-,N-,O-,P-,Q-,R-,S+,T-,V-,X+}
  3. {$ELSE}
  4. {$A+,B-,D-,E-,F-,G+,I-,L-,N-,O-,R-,S+,V-,X+}
  5. {$ENDIF}
  6. {$M 16384,0,655360}
  7. var TimerTick: Word absolute $0040:$006C;
  8.     StartTick: Word;
  9.     Reps: LongInt;
  10.  
  11. begin
  12.   Reps := 0;
  13.   StartTick := TimerTick;
  14.   while StartTick = TimerTick do {wait for end of TimerTick};
  15.   StartTick := TimerTick;
  16.   repeat
  17.     { call function }
  18.     Inc(Reps);
  19.   until StartTick <> TimerTick;
  20.   writeln(Reps);
  21. end.
  22.