Why a single code like this can consume about 15% of CPU usage in a Intel I7 processor?
#include <SFML/Graphics.hpp>
using namespace sf;
int main()
{
RenderWindow window(VideoMode(800, 600), "Janela", Style::Close);
window.setFramerateLimit(120);
while (window.isOpen())
{
for (Event event; window.pollEvent(event);) {
if (event.type == Event::Closed)
window.close();
}
}
return EXIT_SUCCESS;
}