For the life of me I can't figure out what the issue is. I've done plenty of searches, but I think I might be missing something since I now have tunnel vision. I'm using SFML 2.1 for this.
Here's the minimal example with code from a search:
int main() {
sf::RenderWindow Window(sf::VideoMode(100, 100, 32), "Test");
Window.setFrameLimit(60);
sf::Clock clock;
float lastTime = 0;
while (Window.isOpen()) {
float currentTime = clock.restart().asSeconds();
float fps = 1.f / (currentTime - lastTime);
lastTime = currentTime;
std::cout << fps << std::endl;
}
return 0;
}
Console:
-327.225
32258.1
23255.8
-1002
And so on with various numbers