Sha256: 998357f16dd5227e293c65fd8f6e52a01044ca5368f07352b7faf4a384d440e4

Contents?: true

Size: 367 Bytes

Versions: 36

Compression:

Stored size: 367 Bytes

Contents

# frozen_string_literal: true

module Cucumber
  module Formatter
    module Duration
      # Helper method for formatters that need to
      # format a duration in seconds to the UNIX
      # <tt>time</tt> format.
      def format_duration(seconds)
        m, s = seconds.divmod(60)
        "#{m}m#{format('%<seconds>.3f', seconds: s)}s"
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 4 rubygems

Version Path
cucumber-9.2.1 lib/cucumber/formatter/duration.rb
cucumber-9.2.0 lib/cucumber/formatter/duration.rb
cucumber-9.1.2 lib/cucumber/formatter/duration.rb
cucumber-9.1.1 lib/cucumber/formatter/duration.rb
honeybadger-5.4.0 vendor/bundle/ruby/3.2.0/gems/cucumber-9.1.0/lib/cucumber/formatter/duration.rb
cucumber-9.1.0 lib/cucumber/formatter/duration.rb
honeybadger-5.3.0 vendor/bundle/ruby/3.2.0/gems/cucumber-9.0.2/lib/cucumber/formatter/duration.rb
cucumber-9.0.2 lib/cucumber/formatter/duration.rb
cucumber-9.0.1 lib/cucumber/formatter/duration.rb
cucumber-9.0.0 lib/cucumber/formatter/duration.rb
rubypitaya-3.12.5 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/formatter/duration.rb
rubypitaya-3.12.4 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/formatter/duration.rb
rubypitaya-3.12.3 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/formatter/duration.rb
rubypitaya-3.12.2 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/formatter/duration.rb
cucumber-8.0.0 lib/cucumber/formatter/duration.rb
cucumber-8.0.0.rc.1 lib/cucumber/formatter/duration.rb
phillipug-foodie-0.1.0 .vendor/ruby/3.0.0/gems/cucumber-7.1.0/lib/cucumber/formatter/duration.rb
cucumber-7.1.0 lib/cucumber/formatter/duration.rb
cucumber-7.0.0 lib/cucumber/formatter/duration.rb
cucumber-6.1.0 lib/cucumber/formatter/duration.rb