pub struct WindowFrameClockService { /* private fields */ }Implementations§
Source§impl WindowFrameClockService
impl WindowFrameClockService
Sourcepub fn fixed_delta_from_env() -> Option<Duration>
pub fn fixed_delta_from_env() -> Option<Duration>
Returns the process-wide fixed frame delta override (if any).
This is cached (OnceLock) so it can be called from hot paths.
Env var precedence:
FRET_DIAG_FIXED_FRAME_DELTA_MS(preferred)FRET_FRAME_CLOCK_FIXED_DELTA_MS(generic)
pub fn snapshot(&self, window: AppWindowId) -> Option<WindowFrameClockSnapshot>
pub fn fixed_delta(&self, window: AppWindowId) -> Option<Duration>
Sourcepub fn effective_fixed_delta(&self, window: AppWindowId) -> Option<Duration>
pub fn effective_fixed_delta(&self, window: AppWindowId) -> Option<Duration>
Returns the effective fixed frame delta for window.
This prefers an explicit per-window override set via set_fixed_delta, and falls back to
the process-wide env override (if any).
pub fn set_snapshot( &mut self, window: AppWindowId, snapshot: WindowFrameClockSnapshot, )
pub fn set_fixed_delta(&mut self, window: AppWindowId, delta: Option<Duration>)
Sourcepub fn record_frame(&mut self, window: AppWindowId, frame_id: FrameId)
pub fn record_frame(&mut self, window: AppWindowId, frame_id: FrameId)
Record a best-effort frame clock snapshot for window (ADR 0240).
Within a single frame (as identified by frame_id), repeated calls are ignored to keep
delta stable.
When a fixed delta override is enabled (via set_fixed_delta, or the env vars
FRET_DIAG_FIXED_FRAME_DELTA_MS / FRET_FRAME_CLOCK_FIXED_DELTA_MS), the snapshot becomes
deterministic and advances now_monotonic by delta each time frame_id changes.
pub fn remove(&mut self, window: AppWindowId)
Trait Implementations§
Source§impl Clone for WindowFrameClockService
impl Clone for WindowFrameClockService
Source§fn clone(&self) -> WindowFrameClockService
fn clone(&self) -> WindowFrameClockService
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WindowFrameClockService
impl Debug for WindowFrameClockService
Source§impl Default for WindowFrameClockService
impl Default for WindowFrameClockService
Source§fn default() -> WindowFrameClockService
fn default() -> WindowFrameClockService
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for WindowFrameClockService
impl RefUnwindSafe for WindowFrameClockService
impl Send for WindowFrameClockService
impl Sync for WindowFrameClockService
impl Unpin for WindowFrameClockService
impl UnsafeUnpin for WindowFrameClockService
impl UnwindSafe for WindowFrameClockService
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more