From b9c8c7b08d2778b6717c2df0731605aea35dc0a2 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Fri, 13 Jan 2023 18:17:15 +0100 Subject: Clarify documentation of `window::frames` --- native/src/window.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'native/src/window.rs') diff --git a/native/src/window.rs b/native/src/window.rs index bd92730d..a5cdc8ce 100644 --- a/native/src/window.rs +++ b/native/src/window.rs @@ -17,7 +17,11 @@ use crate::time::Instant; /// Subscribes to the frames of the window of the running application. /// /// The resulting [`Subscription`] will produce items at a rate equal to the -/// framerate of the monitor of said window. +/// refresh rate of the window. Note that this rate may be variable, as it is +/// normally managed by the graphics driver and/or the OS. +/// +/// In any case, this [`Subscription`] is useful to smoothly draw application-driven +/// animations without missing any frames. pub fn frames() -> Subscription { subscription::raw_events(|event, _status| match event { crate::Event::Window(Event::RedrawRequested(at)) => Some(at), -- cgit