Module: Cucumber::Formatter::Duration
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/cucumber/formatter/duration.rb', line 9 def format_duration(seconds) m, s = seconds.divmod(60) "#{m}m#{format('%<seconds>.3f', seconds: s)}s" end |