#include <clocker.h>
Public Methods | |
clocker (void) | |
Constructor. | |
~clocker (void) | |
Destructor. | |
void | reset (void) |
Resets the clock. More... | |
void | update (void) |
Update the clock. More... | |
double | elapsed () const |
Returns how much time (in seconds) has elapsed since the last update. |
Used to measure elapsed time. Useful for delta t physics motion and frames per second calculations.
Definition at line 21 of file clocker.h.
|
Resets the clock. Sets the elapsed time to 0.0. Sets the previous timestamp to now. Definition at line 29 of file clocker.cpp. Referenced by video_X::init, and video_sdl::init. |
|
Update the clock. Determines how much time has elapsed since the last update. This method should be called once (and only once) per frame. Definition at line 41 of file clocker.cpp. Referenced by video_X::start_frame, and video_sdl::start_frame. |