Method: Mutant::Variable::Timer.elapsed

Defined in:
lib/mutant/variable.rb

.elapsedFloat

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Monotonic elapsed time of block execution

Returns:

  • (Float)


62
63
64
65
66
# File 'lib/mutant/variable.rb', line 62

def self.elapsed
  start = now
  yield
  now - start
end