method

timing

rails latest stable - Class: ActiveSupport::ContinuousIntegration

Method not available on this version

This method is only available on newer versions. The first available version (v8.1.1) is shown here.

timing()
private

No documentation available.

# File activesupport/lib/active_support/continuous_integration.rb, line 134
      def timing
        started_at = Time.now.to_f
        yield
        min, sec = (Time.now.to_f - started_at).divmod(60)
        "#{"#{min}m" if min > 0}%.2fs" % sec
      end