# class ActiveSupport::Testing::Performance::Metrics::Time

### Public Instance Methods

format(measurement) click to toggle source

    # File lib/active_support/testing/performance.rb, line 282
    def format(measurement)
      if measurement < 1
        '%d ms' % (measurement * 1000)
      else
        '%.2f sec' % measurement
      end
    end

measure() click to toggle source

    # File lib/active_support/testing/performance.rb, line 278
    def measure
      ::Time.now.to_f
    end