Sha256: df850b4b2c0534685add2d35bb2263ac97bfdff8c0189df73c9dd010bff2966c
Contents?: true
Size: 445 Bytes
Versions: 13
Compression:
Stored size: 445 Bytes
Contents
class Object def time_now Time.now.strftime("%s%L").to_i end def stamper(message = nil, &block) def stamp(message = "<no subj>") time_passed = time_now - @time_initial puts("~ testing: #{message}, #{time_passed}ms") end puts("~ #{message}") puts("~ testing: start") @time_initial = time_now yield time_passed = time_now - @time_initial puts("~ testing: end (#{time_passed}ms)") end end
Version data entries
13 entries across 13 versions & 1 rubygems