Vtc.Timecode.compare

You're seeing just the function compare, go back to Vtc.Timecode module for more information.

Specs

compare(t(), t() | Vtc.Source.Frames.t()) :: :lt | :eq | :gt

Returns whether a is greater than, equal to, or less than b in terms of real-world seconds.

b May be any value that implements the Frames protocol, such as a timecode string, and will be assumed to be the same framerate as a. This is mostly to support quick scripting.

Examples

Using two timecodes, 01:00:00:00 NTSC is greater than 01:00:00:00 true because it represents more real-world time.

iex> a = Timecode.with_frames!("01:00:00:00", Rates.f23_98())
iex> b = Timecode.with_frames!("01:00:00:00", Rates.f24())
iex> :gt = Timecode.compare(a, b)

Using a timcode and a bare string:

iex> timecode = Timecode.with_frames!("01:00:00:00", Rates.f23_98())
iex> :eq = Timecode.compare(timecode, "01:00:00:00")