Image

Imagelone_wolf225 wrote in Imagecpp

Timing

-This is visual studio.net 2003 C++ -

Yeah, I'm looking through MSDN.net, because I have an assignment where I need to time how long some functions take (basically test runtimes for different functions, where I test them with varying values of n).

We were suggested to use the ctime and cstdlib libraries which would help us do that. I've done runtimes of functions and stuff before using those libraries, but it's been a long time, and I forgot what I used. I looked through MSDN.net, and I really don't understand a good method to go about it, since all I can find is by seconds, and nothing smaller. Anyone have an example on some link somewhere I can look at timing from when a function is called to when it returns?

Basically:

Start timer
Function call
End timer
Output time.

Just being able to do that for multiple functions in a program.