Expand description
Time and clock abstractions for synchronization
§Time and clock abstractions for Rill
This module provides timing and synchronization primitives for real-time signal processing. It includes clock sources, tick information, and utilities for sample-accurate timing.
§Key Components
ClockTick: A single tick of the signal clock with timing informationClockSource: Trait for objects that can provide clock ticksSystemClock: Software-based clock using system timeClock: Legacy clock trait (deprecated, useClockSource)
§Example
use rill_core::time::{SystemClock, ClockSource};
let mut clock = SystemClock::with_sample_rate(44100.0);
let tick = clock.next_tick(64);
println!("Sample position: {}", tick.sample_pos);
println!("Time since last tick: {} seconds", tick.delta_seconds());Modules§
- prelude
- Prelude for convenient imports
Structs§
- Clock
Tick - A tick of the system clock
- Render
Context - Unified render context — passed by
&reference through the entire signal graph during one processing block. - System
Clock - High-precision system clock for sample-accurate timing.
- Transport
State - Musical transport state — derived from JACK/PipeWire transport or MIDI clock.
Enums§
- Time
Error - Errors that can occur during time and clock operations
Traits§
- Clock
Source - A source of clock ticks for signal processing
Type Aliases§
- Time
Result - Result type for time operations