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 audio clock with timing informationClockSource: Trait for objects that can provide clock ticksSystemClock: Software-based clock using system time- [
Clock]: 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 audio clock
- System
Clock - High-precision system 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