Module: Cucumber::Formatter::Duration
- 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
-
#format_duration(seconds) ⇒ Object
Helper method for formatters that need to format a duration in seconds to the UNIX
time
format.
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 |