Top Level Namespace

Defined Under Namespace

Modules: Judges Classes: Object

Instance Method Summary collapse

Instance Method Details

#elapsed(loog) ⇒ Object



25
26
27
28
29
30
31
32
33
34
# File 'lib/judges/elapsed.rb', line 25

def elapsed(loog)
  start = Time.now
  begin
    yield
  rescue UncaughtThrowError => e
    tag = e.tag
    throw e unless tag.is_a?(Symbol)
    loog.info("#{tag} in #{start.ago}")
  end
end