New answers tagged

0

Try something such as 3 stages waiting: m_tickEnd = m_timer.Mark() * 1000.0; // converting seconds to milliseconds // Doing all three stages of waiting would safe CPU usage from 30% to less than 10% for a 8 cores PC // 1. sleep while (m_ticksPerFrame - m_tickEnd > 6) { // sleep until has roughly +/- 1 millisecond ...


0

What I figured out is you can do 1000 / clock.tick(60) and you would get an approcimation to the fps but it doesn't return 0 for the first 5 frames


Top 50 recent answers are included