Method: Async::Clock.measure

Defined in:
lib/async/clock.rb

.measureObject

Measure the execution of a block of code.



18
19
20
21
22
23
24
# File 'lib/async/clock.rb', line 18

def self.measure
  start_time = self.now
  
  yield
  
  return self.now - start_time
end