format_clock formats a Tick as H:MM:SS for recording timers and other
readouts that count time rather than frames or samples. ClockStyle pads
the hours to two digits and adds tenths, hundredths or milliseconds
(ClockFraction). The value is truncated at the last printed digit, hours
do not wrap, and a negative value that truncates to zero prints without
a sign.
format_time padded the sample field of TimeDisplay::AudioSamples to five
digits. At 192 kHz the field runs to 191999, so positions in the first
100000 samples of each second printed one character narrower than the
rest, and a fixed-width readout shifted as the time advanced.
The field is now as wide as the digit count of sample_rate - 1, with at
least five digits. Output at 32 to 96 kHz does not change.
Tick::from_duration floors to the tick and saturates at i64::MAX ticks.
Tick::to_duration rounds to the nearest nanosecond and returns None for a
negative tick, so a Duration survives the round trip unchanged.
- Clarify Tick(i64::MIN) overflow documentation in division/remainder contracts.
- Format negative audio sample timestamps with absolute components and leading minus sign.
- Parse 4-field negative timecodes as absolute positions rather than relative offsets.
- Reject signed values inside multi-field timecode components.
Implements the shared exact media timebase crate (craft-time) for FilmCraft,
SoundCraft, EffectCraft, and animation timeline consumers:
- Exact Signed Timebase: Tick represents exact media time across [Tick::MIN, Tick::MAX]
using TICKS_PER_SECOND = 254_016_000_000, supporting exact integer conversions for
standard film, broadcast, audio, and high-framerate rates.
- Total Arithmetic Contract: All operations are strictly panic-free under
#![deny(clippy::panic)], providing checked_* methods and monotonic saturating
division.
- Timecode and Film Footage: Full SMPTE 12M drop-frame and non-drop-frame formatting,
35mm and 16mm feet+frames, broadcast zero-padded hours, and EffectCraft unpadded hours.
- Differential Testing: 15 test suites incorporating full FilmCraft and EffectCraft
parity vectors, boundary saturation tests, and proptest monotonicity invariants.