Change docs on WaitUntil to not suggest Poll

This commit is contained in:
Mads Marquart
2024-09-10 16:16:13 +02:00
parent b674d20edf
commit 69783445f1

View File

@@ -148,11 +148,12 @@ pub enum ControlFlow {
/// When the current loop iteration finishes, suspend the thread until either another event /// When the current loop iteration finishes, suspend the thread until either another event
/// arrives or the given time is reached. /// arrives or the given time is reached.
/// ///
/// Useful for implementing efficient timers. Applications which want to render at the /// Useful for implementing efficient timers, but should not be relied on for real-time needs
/// display's native refresh rate should instead use [`Poll`] and the VSync functionality /// like rendering (VSync) or audio. Applications which want to render at the display's native
/// of a graphics API to reduce odds of missed frames. /// refresh rate should instead issue a [`Window::request_redraw`] at the end of
/// [`WindowEvent::RedrawRequested`].
/// ///
/// [`Poll`]: Self::Poll /// [`WindowEvent::RedrawRequested`]: crate::window::WindowEvent::RedrawRequested
WaitUntil(Instant), WaitUntil(Instant),
} }