diff options
Diffstat (limited to 'activesupport/lib/active_support/cache.rb')
-rw-r--r-- | activesupport/lib/active_support/cache.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/cache.rb b/activesupport/lib/active_support/cache.rb index 10281d60eb..6a6c861458 100644 --- a/activesupport/lib/active_support/cache.rb +++ b/activesupport/lib/active_support/cache.rb @@ -143,13 +143,13 @@ module ActiveSupport log("miss", key, options) value = nil - seconds = Benchmark.realtime { value = yield } + ms = Benchmark.ms { value = yield } @logger_off = true write(key, value, options) @logger_off = false - log("write (will save #{'%.2f' % (seconds * 1000)}ms)", key, nil) + log('write (will save %.2fms)' % ms, key, nil) value end |