* Updates the amount of Frames per Second. */
| 102 | * Updates the amount of Frames per Second. |
| 103 | */ |
| 104 | void FpsCounter::update() |
| 105 | { |
| 106 | int fps = (int)floor((double)_frames / _timer->getTime() * 1000); |
| 107 | _text->setValue(fps); |
| 108 | _frames = 0; |
| 109 | _redraw = true; |
| 110 | } |
| 111 | |
| 112 | /** |
| 113 | * Draws the FPS counter. |