MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / getMsPerFrame

Method getMsPerFrame

Engine/source/gfx/video/videoCapture.cpp:73–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73S32 VideoCapture::getMsPerFrame()
74{
75 //Add accumulated error to ms per frame before rounding
76 F32 roundTime = mFloor(mMsPerFrame + mMsPerFrameError + 0.5f);
77
78 //Accumulate the rounding errors
79 mMsPerFrameError += mMsPerFrame - roundTime;
80
81 return (S32)roundTime;
82}
83
84void VideoCapture::begin( GuiCanvas* canvas )
85{

Callers 1

processTimeEventFunction · 0.80

Calls 1

mFloorFunction · 0.85

Tested by

no test coverage detected