PDA

View Full Version : Program Timing


hanan
01-04-04, 10:28 AM
part of my project works by Using borland C++ compilr 5.5 to execute a program , I wont also to print out the time it's take in compile, and also in run..

how could I do that, I mean that part related to timing?

hyjacked
01-05-04, 09:26 PM
try looking up info for the time() function.

time(0); would return the current time in seconds.

Call and save the value at the start and end of the program. the difference between the 2 would give you how long it took the program to run.

hanan
01-06-04, 12:17 PM
I did what U said and it's work.. thanks alot..
but I think if I could do it in c++, it will simple to convert it to PHP, but this not true, becuase I couldn't :(

I think I will submit my Q in PHP F..

thank U again :)