Earlier i had posted a tutorial on doing high resolution timing on windows and i’d given a very basic class to act as a timer, now i found when doing my graphics work i often needed multiple timers and so i just extended my baby timer class a little to support multiple timers.
So you can create as many timers as you need on the fly (the controller class acts as a big timer vector) and also get a pointer back for each timer if you wish to create a easily readable shortcut ie.
HRTimer* animationTimer = timers[5];
hope you find it useful: MHRTimer.h
I need a somewhat specialized C++ timer class. My task is:
while (!EOF)
read record from file into two variables
use one variable as a parameter for a function
use other variable as timer interval
start timer
when interval is reached, execute another function
stop timer
endwhile
Can you help?
Thanks