• Advertisement

Archived

This topic is now archived and is closed to further replies.

Guest Anonymous Poster

Where can I find a good timer function in C?

This topic is 6629 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

If your working in MSVC then all you have to do is run the profiler. That will give you details such as how long each function runs for and how many times it was called.. etc.

Share this post


Link to post
Share on other sites
Advertisement
DeNovo,
Check out the mmsystem.h files.. Borland lists the help under Multimedia API reference. They have some neat timers in there.

Good luck-

Six

Share this post


Link to post
Share on other sites
You can use the MMSYSTEM call TimeGetTime() to retrieve the number of millisenconds since Windows started, accurate to within 1 millisecond. By taking away successive calls to this function you can find out how fast your code is going.

Depending on the code, you might have to make it repeat a few times to get a good reading.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I'm looking for a timer function for evaluating the effectiveness of my code, but can't find anything anywhere.
I found a timer lib (StartTimer and EndTimer) but that has to be called from ASM and I don't know how to do it.
Please, could someone help me with this?

Share this post


Link to post
Share on other sites

  • Advertisement