Sha256: aead25e046a6f5ea39d2c57176219a1537198010008b8bdd9560c68cb38ec3aa
Contents?: true
Size: 330 Bytes
Versions: 7
Compression:
Stored size: 330 Bytes
Contents
# require 'h8' def timing name, repetitions = 1, scale = 1 s = Time.now repetitions.times { yield } t = Time.now - s if scale != 1 puts "#{name}\t: #{t} scaled: #{t*scale}" else puts "#{name}\t: #{t}" end rescue puts "*** #{$!}" raise end class Console def log *args puts args.join(' ') end end
Version data entries
7 entries across 7 versions & 1 rubygems