From 92dbac623bfa1880520d46256172813233c87e65 Mon Sep 17 00:00:00 2001 From: Chris Thrasher Date: Wed, 19 Apr 2023 14:10:57 -0600 Subject: [PATCH] Document precision limitation of `sf::sleep` --- include/SFML/System/Sleep.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/SFML/System/Sleep.hpp b/include/SFML/System/Sleep.hpp index 8833b566..f2ca10fc 100644 --- a/include/SFML/System/Sleep.hpp +++ b/include/SFML/System/Sleep.hpp @@ -44,6 +44,11 @@ class Time; /// one provides more accurate sleeping time thanks to some /// platform-specific tweaks. /// +/// sf::sleep only guarantees millisecond precision. Sleeping +/// for a duration less than 1 millisecond is prone to result +/// in the actual sleep duration being less than what is +/// requested. +/// /// \param duration Time to sleep /// ////////////////////////////////////////////////////////////