Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
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 · ·