29 #include "nomlib/system/FPS.hpp"
35 this->total_frames = 0;
36 this->fps_timer.start();
37 this->fps_update_timer.start();
42 void FPS::start (
void )
44 this->total_frames = 0;
45 this->fps_timer.start();
46 this->fps_update_timer.start();
49 void FPS::stop (
void )
51 this->total_frames = 0;
52 this->fps_timer.stop();
53 this->fps_update_timer.stop();
56 uint32 FPS::frames (
void )
const
58 return this->total_frames;
61 const std::string FPS::asString (
void )
const
63 return std::to_string ( static_cast<uint32> ( this->frames() / ( this->fps_timer.ticks() / 1000.f ) ) );
66 uint32 FPS::fps (
void )
const
68 return this->frames() /
static_cast<uint32
> ( ( this->fps_timer.ticks() / 1000.f ) );
71 void FPS::update (
void )