Sha256: fd74c7a52e71844f00ba1fe23d9df518f6fbe84ffcbdfe0a3c2e9e3f04d21efc

Contents?: true

Size: 357 Bytes

Versions: 16

Compression:

Stored size: 357 Bytes

Contents

module VagrantPlugins
  module Shell
    module Util
      class Timer
        # A basic utility method that times the execution of the given
        # block and returns it.
        def self.time
          start_time = Time.now.to_f
          yield
          end_time = Time.now.to_f

          end_time - start_time
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
vagrant-shell-0.2.22 lib/vagrant-shell/util/timer.rb
vagrant-shell-0.2.21 lib/vagrant-shell/util/timer.rb
vagrant-shell-0.2.20 lib/vagrant-shell/util/timer.rb
vagrant-shell-0.2.19 lib/vagrant-shell/util/timer.rb
vagrant-shell-0.2.17 lib/vagrant-shell/util/timer.rb
vagrant-shell-0.2.16 lib/vagrant-shell/util/timer.rb
vagrant-shell-0.2.15 lib/vagrant-shell/util/timer.rb
vagrant-shell-0.2.14 lib/vagrant-shell/util/timer.rb
vagrant-shell-0.2.13 lib/vagrant-shell/util/timer.rb
vagrant-shell-0.2.12 lib/vagrant-shell/util/timer.rb
vagrant-shell-0.2.9 lib/vagrant-shell/util/timer.rb
vagrant-shell-0.2.8 lib/vagrant-shell/util/timer.rb
vagrant-shell-0.2.6 lib/vagrant-shell/util/timer.rb
vagrant-shell-0.2.5 lib/vagrant-shell/util/timer.rb
vagrant-shell-0.2.4 lib/vagrant-shell/util/timer.rb
vagrant-shell-0.2.3 lib/vagrant-shell/util/timer.rb