Conquer Chess
Chess and Starcraft combined
Loading...
Searching...
No Matches
Public Member Functions | List of all members
sleep_scheduler Class Reference

Sleeps enough to reach 50-60 frames per second. More...

#include <sleep_scheduler.h>

Public Member Functions

double get_fps () const noexcept
 Get the number of frames per second.
 
void set_target_fps (double fps)
 Sets the target frame rate.
 
void tick ()
 Indicate a frame has passed.
 

Detailed Description

Sleeps enough to reach 50-60 frames per second.

Member Function Documentation

◆ get_fps()

double sleep_scheduler::get_fps ( ) const
inlinenoexcept

Get the number of frames per second.

◆ set_target_fps()

void sleep_scheduler::set_target_fps ( double  fps)

Sets the target frame rate.

◆ tick()

void sleep_scheduler::tick ( )

Indicate a frame has passed.

This class will sleep here and will tune itself to sleep as much to achieve 50 frames per second


The documentation for this class was generated from the following files: