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.

a = Timecode.new("01:00:00:00", Rates.f23_98())
b = Timecode.new("01:00:00:00", Rates.f24())

:gt = Timecode.compare(a, b)

Using a timcode and a bare string:

:eq = "01:00:00:00" |> Timecode.new(Rates.f23_98()) |> Timecode.compare("01:00:00:00")