time_scroll_bar
time_scroll_bar
Functions
| Name | |
|---|---|
| std::size_t | presetIndexForTargetFps(float fps) Index of the preset closest to fps. |
| float | snapTargetFpsToPreset(float fps) Snap an arbitrary rate to the nearest discrete preset. |
| int | timerPeriodMsForTargetFps(float target_fps) Milliseconds between timer ticks for one-frame-per-tick playback. |
| float | playbackUiRefreshFps(float target_fps) Effective timer tick rate (Hz) for playback UI updates. |
| int | timerPeriodMsForPlayback(float target_fps) Milliseconds between playback QTimer ticks (capped refresh; combine with multi-frame steps in TimeScrollBar::_vidLoop for logical target_fps). |
Attributes
| Name | |
|---|---|
| std::array< float, 9 > | kFpsPresets Discrete playback rates shown in the timeline UI (Phase 3 triage plan). |
| float | kMaxPlaybackUiRefreshFps |
Functions Documentation
function presetIndexForTargetFps
inline std::size_t presetIndexForTargetFps(
float fps
)Index of the preset closest to fps.
Precondition: fps is finite (non-finite values map to index 0 as a safe default)
function snapTargetFpsToPreset
inline float snapTargetFpsToPreset(
float fps
)Snap an arbitrary rate to the nearest discrete preset.
function timerPeriodMsForTargetFps
inline int timerPeriodMsForTargetFps(
float target_fps
)Milliseconds between timer ticks for one-frame-per-tick playback.
Postcondition: Return value is in [1, 2'000'000] so QTimer stays within practical bounds.
function playbackUiRefreshFps
inline float playbackUiRefreshFps(
float target_fps
)Effective timer tick rate (Hz) for playback UI updates.
Postcondition: Return value is finite and > 0
Capped at [kMaxPlaybackUiRefreshFps](/api_generated/Namespaces/namespacetime__scroll__bar.md#variable-kmaxplaybackuirefreshfps) so high logical FPS does not schedule one QTimer callback per source frame. For invalid target_fps, uses 0.5 Hz to match [timerPeriodMsForTargetFps](/api_generated/Namespaces/namespacetime__scroll__bar.md#function-timerperiodmsfortargetfps) fallback (2000 ms).
function timerPeriodMsForPlayback
inline int timerPeriodMsForPlayback(
float target_fps
)Milliseconds between playback QTimer ticks (capped refresh; combine with multi-frame steps in TimeScrollBar::_vidLoop for logical target_fps).
Postcondition: Return value is in [1, 2'000'000] so QTimer stays within practical bounds.
Attributes Documentation
variable kFpsPresets
std::array< float, 9 > kFpsPresets {
0.5F, 1.F, 2.F, 5.F, 10.F, 25.F, 50.F, 100.F, 200.F};Discrete playback rates shown in the timeline UI (Phase 3 triage plan).
variable kMaxPlaybackUiRefreshFps
float kMaxPlaybackUiRefreshFps = 30.F;Maximum QTimer callback rate during playback; logical speed stays at target_fps by advancing multiple frames per tick when target_fps exceeds this cap.
Updated on 2026-11-13 at 20:25:41 +0000