1#ifndef SLEEP_SCHEDULER_H
2#define SLEEP_SCHEDULER_H
28 double m_sleep_time_microseconds{1.0};
31 double m_target_fps{60.0};
Clock to count the frames per second.
Definition fps_clock.h:9
double get_fps() const noexcept
Get the frames per seconds.
Definition fps_clock.h:14
Sleeps enough to reach 50-60 frames per second.
Definition sleep_scheduler.h:8
double get_fps() const noexcept
Get the number of frames per second.
Definition sleep_scheduler.h:12
void tick()
Indicate a frame has passed.
Definition sleep_scheduler.cpp:11
void set_target_fps(double fps)
Sets the target frame rate.
Definition sleep_scheduler.cpp:5
void test_sleep_scheduler()
Test this class.
Definition sleep_scheduler.cpp:27