Method: Timecode.from_seconds
- Defined in:
- lib/timecode.rb
.from_seconds(seconds_float, the_fps = DEFAULT_FPS, drop_frame = false) ⇒ Object
create a timecode from the number of seconds. This is how current time is supplied by QuickTime and other systems which have non-frame-based timescales
275 276 277 278 |
# File 'lib/timecode.rb', line 275 def from_seconds(seconds_float, the_fps = DEFAULT_FPS, drop_frame = false) total_frames = (seconds_float.to_f * the_fps.to_f).round.to_i new(total_frames, the_fps, drop_frame) end |