diff options
author | 2023-01-13 18:17:15 +0100 | |
---|---|---|
committer | 2023-01-13 18:17:15 +0100 | |
commit | b9c8c7b08d2778b6717c2df0731605aea35dc0a2 (patch) | |
tree | 15b0f4e163cd9382b0ae4aa2cb470064db40b601 | |
parent | c6d0046102bb6951bf0f1f6102f748199c5889e2 (diff) | |
download | iced-b9c8c7b08d2778b6717c2df0731605aea35dc0a2.tar.gz iced-b9c8c7b08d2778b6717c2df0731605aea35dc0a2.tar.bz2 iced-b9c8c7b08d2778b6717c2df0731605aea35dc0a2.zip |
Clarify documentation of `window::frames`
-rw-r--r-- | native/src/window.rs | 6 |
1 files changed, 5 insertions, 1 deletions
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<Instant> { subscription::raw_events(|event, _status| match event { crate::Event::Window(Event::RedrawRequested(at)) => Some(at), |