I am just curious as it is nothing really important.
I have just measured in average on function that generate Voronoi diagram which is inside the main sfml event loop.
auto vorStartTime = std::chrono::steady_clock::now();
voronoi.generate();
auto vorEndTime = std::chrono::steady_clock::now();
Then I print each second the average for this function. Each iteration I add vorEndTime - vorStartTime to the overall time and then divide by a number of loops for that time. Than just checking if elapsed at least 1 second from the last loop and if so print the average.
But what is really strange that it gives me 0.3 - 0.6 ms with setFrameLimit to 60.
But if I switch off any FrameLimit, i get 0.14 - 0.16 ms.
The function
voronoi.generate() is using only sf::Vector2f from the whole SFML library for points.
I am just curious how it can be possible that setting frame limit has effect on function with has practically nothing to do with SFML. Or it can be possible that setting the frame limit makes the processor more idle so that the max turbo frequency of processor is not used (intel i7-1265u 1.8 MHz)