Usage
StopWatch s;
/* Timed stuff here */
s.tick();
/* Other stuff */
float dt = s.getTimeElapsed();
or
StopWatch s;
/* Other stuff */
s.tick();
/* Timed stuff here */
s.tick();
/* Other stuff */
float dt = s.getTimeElapsed();
This is a very basic C++11 stopwatch implementation using <chrono>
StopWatch s;
/* Timed stuff here */
s.tick();
/* Other stuff */
float dt = s.getTimeElapsed();
or
StopWatch s;
/* Other stuff */
s.tick();
/* Timed stuff here */
s.tick();
/* Other stuff */
float dt = s.getTimeElapsed();
This is a very basic C++11 stopwatch implementation using <chrono>