r5sdk/r5dev/engine/framelimit.h
Kawe Mazidjatari 907e582f55 Remove latency markers
Some parts of the engine have to be rebuild in order to implement this correctly, therefore, it has been removed for now to avoid potential performance problems.

fps_max_rt and fps_max_gfx have been limited to 295 to avoid a contest with the engine's hard limit causing huge performance hits.
2023-09-13 17:37:09 +02:00

31 lines
620 B
C++

#ifndef FRAMELIMIT_H
#define FRAMELIMIT_H
//-----------------------------------------------------------------------------
// RenderThread frame limiter
//-----------------------------------------------------------------------------
class CFrameLimit
{
public:
CFrameLimit(void);
void Reset(double target);
void Run(void);
private:
double m_MilliSeconds;
double m_FramesPerSecond;
//double m_EffectiveMilliSeconds;
//LARGE_INTEGER m_Last;
LARGE_INTEGER m_Start;
LARGE_INTEGER m_Next;
LARGE_INTEGER m_Time;
uint32_t m_Frames;
bool m_bRestart;
};
extern CFrameLimit g_FrameLimiter;
#endif // FRAMELIMIT_H