Skip to main content

Module clock

Module clock 

Source
Expand description

One clock every view follows. A workspace holds one Clock; the video, the traces, the raster, the keypoints all draw what is at its position, and any of them moves it (a click on the timeline, a frame step in the video). The position is in seconds of the reference clock (usually the ephys recording’s); each source maps its own time onto it with an crate::sync::Alignment.

Playback advances the position with the wall clock times the rate, on the UI thread at display rate; views draw the frame or sample at the new position. Frame steps move by the clock’s step (the video’s frame interval when a video is open).

The playback keys are their own section ([playback]), bound only where a workspace says (its key context): PLAYBACK_KEYS, binding.

Structs§

Clock
The shared time cursor of a workspace.
Faster
Play faster.
JumpBack
Ten frames back.
JumpForward
Ten frames forward.
Slower
Play slower.
StepBack
One frame back.
StepForward
One frame forward.
TogglePlay
Play or pause.

Enums§

ClockEvent
What the clock tells the views.

Constants§

PLAYBACK_KEYS
The [playback] section of keybindings.toml: commands and their default keys.
RATES
The rates playback steps through ([ and ]).
SECTION
The playback section’s name.

Functions§

binding
The binding of command to key in the key context context (a workspace’s, so the space bar plays the video there and does something else elsewhere). An app resolves [playback] with kitchen-shell’s keys::resolve and binds what this gives.