mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-11 13:31:29 +11:00
Discourage use of WaitUntil to implement VSync (#2230)
This commit is contained in:
parent
6c1d3c4fd8
commit
2ae12fb0a0
|
@ -140,6 +140,10 @@ pub enum ControlFlow {
|
|||
Wait,
|
||||
/// 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.
|
||||
WaitUntil(Instant),
|
||||
/// Send a `LoopDestroyed` event and stop the event loop. This variant is *sticky* - once set,
|
||||
/// `control_flow` cannot be changed from `ExitWithCode`, and any future attempts to do so will
|
||||
|
|
Loading…
Reference in a new issue