home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
ENTERPRS
/
CPM
/
UTILS
/
S
/
TPTUTOR2.ARC
/
PROG17.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1985-06-28
|
697b
|
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.