Sha256: 4ec6db19fcac2c6096e4db8c45992fd40085088d092b5fba948822350a90941a

Contents?: true

Size: 358 Bytes

Versions: 2

Compression:

Stored size: 358 Bytes

Contents

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

2 entries across 2 versions & 1 rubygems

Version Path
vagrant-ganeti-0.1.1 lib/vagrant-ganeti/util/timer.rb
vagrant-ganeti-0.0.1 lib/vagrant-plugin-ganeti/util/timer.rb