You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

duration.rb 367 B

2 years ago
123456789101112131415
  1. # frozen_string_literal: true
  2. module Cucumber
  3. module Formatter
  4. module Duration
  5. # Helper method for formatters that need to
  6. # format a duration in seconds to the UNIX
  7. # <tt>time</tt> format.
  8. def format_duration(seconds)
  9. m, s = seconds.divmod(60)
  10. "#{m}m#{format('%<seconds>.3f', seconds: s)}s"
  11. end
  12. end
  13. end
  14. end

No Description

Contributors (1)