summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-01-13 18:17:15 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-01-13 18:17:15 +0100
commitb9c8c7b08d2778b6717c2df0731605aea35dc0a2 (patch)
tree15b0f4e163cd9382b0ae4aa2cb470064db40b601
parentc6d0046102bb6951bf0f1f6102f748199c5889e2 (diff)
downloadiced-b9c8c7b08d2778b6717c2df0731605aea35dc0a2.tar.gz
iced-b9c8c7b08d2778b6717c2df0731605aea35dc0a2.tar.bz2
iced-b9c8c7b08d2778b6717c2df0731605aea35dc0a2.zip
Clarify documentation of `window::frames`
-rw-r--r--native/src/window.rs6
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),