How would I alter my makefile or make a shellscript that will run, compile and record the times for my program. I want to time them to compare results.
How would I alter my makefile or make a shellscript that will run, compile and record the times for my program. I want to time them to compare results.
Try:
timex yourprogramname.exe
Im not sure if there is a man page for timex or not, maybe you can search the net for info. I believe it prints user time, kernel time, & combined time to stdout after your program has exited.
The crows maintain that a single crow could destroy the heavens. Doubtless this is so. But it proves nothing against the heavens, for the heavens signify simply: the impossibility of crows.
Not sure how to actually compute the time, but you can using something called big O notation.
It calculates the theorictal time/space of algorithms.
-MethodMan-
Your Move:Life is a game, Play it; Life is a challenge, Meet it; Life is an opportunity, capture it.
Homepage: http://www.freewebs.com/andy_moog/home.html
yes, with the big O notation you can compute several things, not only the time needed for the program.
BUT: you donīt get "this takes 30 seconds" but you get something like "your program is in O(nē)"... so, the O notation depends on a variable, or two or even more... and i think the author of this thread wants to get the real time!
wudmx