[core] Create function to retrieve frame busy time (non-sleeping time)
This commit is contained in:
parent
c0c2e28c1b
commit
beee9cee46
|
|
@ -1061,6 +1061,7 @@ RLAPI Matrix GetCameraMatrix2D(Camera2D camera); // Get c
|
||||||
// Timing-related functions
|
// Timing-related functions
|
||||||
RLAPI void SetTargetFPS(int fps); // Set target FPS (maximum)
|
RLAPI void SetTargetFPS(int fps); // Set target FPS (maximum)
|
||||||
RLAPI float GetFrameTime(void); // Get time in seconds for last frame drawn (delta time)
|
RLAPI float GetFrameTime(void); // Get time in seconds for last frame drawn (delta time)
|
||||||
|
RLAPI float GetFrameBusyTime(void); // Get the time spent actively updating and drawing a frame, excluding sleep time.
|
||||||
RLAPI double GetTime(void); // Get elapsed time in seconds since InitWindow()
|
RLAPI double GetTime(void); // Get elapsed time in seconds since InitWindow()
|
||||||
RLAPI int GetFPS(void); // Get current FPS
|
RLAPI int GetFPS(void); // Get current FPS
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1633,6 +1633,13 @@ float GetFrameTime(void)
|
||||||
return (float)CORE.Time.frame;
|
return (float)CORE.Time.frame;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Get the time spent actively updating and drawing a frame, excluding sleep time.
|
||||||
|
float GetFrameBusyTime(void)
|
||||||
|
{
|
||||||
|
return (float)(CORE.Time.update + CORE.Time.draw);
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Module Functions Definition: Custom frame control
|
// Module Functions Definition: Custom frame control
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user