Hi, i need some help in code.
how can i time the duration of a simple text based program, im using turbo pascal v7, using 'crt' and maybe 'dos' if i need to, i used the gettime command like this; '
h, m, s, hund : Word;
function time(w : Word) : String;
s : String;
if Length(s) = 1 then
s := '0' + s;
time := s;
Writeln('your time is ',time(h),':',time(m),':',time(s),'.',time(hund));
so i can read/write the time at start and finish, but you cant subtract time, you get some werid number, if i do this sort of command twice how can i work out the differance? is there an easyier way to workout the time from when the program starts and finishes? thanx for anyones help
0 · ·