Skip to content

Commit

Permalink
Change docs on WaitUntil to not suggest Poll
Browse files Browse the repository at this point in the history
  • Loading branch information
madsmtm committed Sep 10, 2024
1 parent b674d20 commit 6978344
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/event_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,12 @@ pub enum ControlFlow {
/// When the current loop iteration finishes, suspend the thread until either another event
/// arrives or the given time is reached.
///
/// Useful for implementing efficient timers. Applications which want to render at the
/// display's native refresh rate should instead use [`Poll`] and the VSync functionality
/// of a graphics API to reduce odds of missed frames.
/// Useful for implementing efficient timers, but should not be relied on for real-time needs
/// like rendering (VSync) or audio. Applications which want to render at the display's native
/// 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),
}

Expand Down

0 comments on commit 6978344

Please sign in to comment.