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

Version Path
cutter-0.5.12 lib/cutter/stamper.rb
cutter-0.5.11 lib/cutter/stamper.rb
cutter-0.5.10 lib/cutter/stamper.rb
cutter-0.5.9 lib/cutter/stamper.rb
cutter-0.5.8 lib/cutter/stamper.rb
cutter-0.5.7 lib/cutter/stamper.rb
cutter-0.5.5 lib/cutter/stamper.rb
cutter-0.5.4 lib/cutter/stamper.rb
cutter-0.5.3 lib/cutter/stamper.rb
cutter-0.5.2 lib/cutter/stamper.rb
cutter-0.5.1 lib/cutter/stamper.rb
cutter-0.5.0 lib/cutter/stamper.rb
cutter-0.0.3 lib/cutter/stamper.rb