home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
cpm
/
turbopas
/
ttutor2.lbr
/
PROG17.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1985-08-02
|
768b
|
35 lines
PROGRAM PROG17;
{$U+ Copyright (C), 1985 by Lyle Faurot. All rights reserved.
New Topics: Include files
Timing function
}
VAR
A, B,
Start_Time,
Stop_Time,
Elapsed_Time : Real;
I, J, K : Integer;
{$I Time.Inc Get system time in seconds }
BEGIN
REPEAT
WriteLn('Enter number of repetitions: ');
Read(K);
Start_Time := Time;
FOR I := 1 to K DO
A := Time;
Stop_Time := Time;
Elapsed_Time := Stop_Time - Start_Time;
Write(' Repetitions took ', Elapsed_Time:-6:4, ' Seconds,');
WriteLn(' One Repetition took ', Elapsed_Time / K:-6:4,' Seconds');
WriteLn;
UNTIL K=9;
END.