How can i get frames per second using delta time.
Here's my code that return delta time
auto const old = last;
last = steady_clock::now();
const duration<float> frameTime = last - old;
return frameTime.count();
How can i get frames per second using delta time.
Here's my code that return delta time
auto const old = last;
last = steady_clock::now();
const duration<float> frameTime = last - old;
return frameTime.count();
Suppose your delta time is in milliseconds, then fps (frames per second) is calculate as fps = 1000 / delta_time.