diff options
-rw-r--r-- | lib/ohai/runner.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ohai/runner.rb b/lib/ohai/runner.rb index bc69bc9c..e86c6118 100644 --- a/lib/ohai/runner.rb +++ b/lib/ohai/runner.rb @@ -38,7 +38,7 @@ module Ohai # If force is set to true, then this plugin and its dependencies # will be run even if they have been run before. def run_plugin(plugin) - elapsed = Benchmark.measure do + elapsed = Benchmark.realtime do unless plugin.is_a?(Ohai::DSL::Plugin) raise Ohai::Exceptions::InvalidPlugin, "Invalid plugin #{plugin} (must be an Ohai::DSL::Plugin or subclass)" end @@ -57,7 +57,7 @@ module Ohai logger.trace("Plugin #{plugin.name} threw exception #{e.inspect} #{e.backtrace.join("\n")}") end end - logger.trace("Plugin #{plugin.name} took #{elapsed.total} seconds to run.") + logger.trace("Plugin #{plugin.name} took #{elapsed} seconds to run.") end def run_v7_plugin(plugin) |