MCPcopy Create free account
hub / github.com/BoomingTech/Piccolo / calculateDeltaTime

Method calculateDeltaTime

engine/source/runtime/engine.cpp:53–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51 }
52
53 float PiccoloEngine::calculateDeltaTime()
54 {
55 float delta_time;
56 {
57 using namespace std::chrono;
58
59 steady_clock::time_point tick_time_point = steady_clock::now();
60 duration<float> time_span = duration_cast<duration<float>>(tick_time_point - m_last_tick_time_point);
61 delta_time = time_span.count();
62
63 m_last_tick_time_point = tick_time_point;
64 }
65 return delta_time;
66 }
67
68 bool PiccoloEngine::tickOneFrame(float delta_time)
69 {

Callers 1

runMethod · 0.80

Calls 1

countMethod · 0.45

Tested by

no test coverage detected