# File lib/rspec/core/formatters/helpers.rb, line 20 def format_seconds(float) precision ||= (float < 1) ? SUB_SECOND_PRECISION : DEFAULT_PRECISION formatted = sprintf("%.#{precision}f", float) strip_trailing_zeroes(formatted) end