Jump to content

  • Log In with Google      Sign In   
  • Create Account


Where can I find a good timer function in C?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Posted 28 November 1999 - 11:51 AM

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?


Sponsor:

#2 Gromit   Members   -  Reputation: 144

Posted 14 November 1999 - 05:07 AM

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.

#3 Sixpack   Members   -  Reputation: 122

Posted 14 November 1999 - 05:50 PM

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


#4 agentq   Members   -  Reputation: 122

Posted 28 November 1999 - 11:51 AM

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.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS