Sha256: 6c28110baab9291e6922c139b9842b7cd4bdf438e2d66e83ff553de73f93ec80

Contents?: true

Size: 354 Bytes

Versions: 3

Compression:

Stored size: 354 Bytes

Contents

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

3 entries across 3 versions & 1 rubygems

Version Path
vagrant-gq-0.1.2 lib/vagrant-gq/util/timer.rb
vagrant-gq-0.1.1 lib/vagrant-gq/util/timer.rb
vagrant-gq-0.1.0 lib/vagrant-gq/util/timer.rb