Module: Cucumber::Formatter::Duration

Included in:
Console, Runtime
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/formatter/duration.rb

Instance Method Summary collapse

Instance Method Details

#format_duration(seconds) ⇒ Object

Helper method for formatters that need to format a duration in seconds to the UNIX time format.



9
10
11
12
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/formatter/duration.rb', line 9

def format_duration(seconds)
  m, s = seconds.divmod(60)
  "#{m}m#{format('%<seconds>.3f', seconds: s)}s"
end