Sha256: 1142d739f32976468d89d27ac08e2dee505b8173341f80f8cffb939afd565380

Contents?: true

Size: 357 Bytes

Versions: 7

Compression:

Stored size: 357 Bytes

Contents

module VagrantPlugins
  module XHYVE
    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

7 entries across 7 versions & 1 rubygems

Version Path
vagrant-xhyve-0.4.1 lib/vagrant-xhyve/util/timer.rb
vagrant-xhyve-0.4.0 lib/vagrant-xhyve/util/timer.rb
vagrant-xhyve-0.3.0 lib/vagrant-xhyve/util/timer.rb
vagrant-xhyve-0.2.0 lib/vagrant-xhyve/util/timer.rb
vagrant-xhyve-0.1.1 lib/vagrant-xhyve/util/timer.rb
vagrant-xhyve-0.1.1.pre lib/vagrant-xhyve/util/timer.rb
vagrant-xhyve-0.1.0.pre lib/vagrant-xhyve/util/timer.rb