module Statue::Clock

Public Instance Methods

duration_in_ms() { || ... } click to toggle source
# File lib/statue/clock.rb, line 19
def duration_in_ms
  start = now_in_ms
  yield
  now_in_ms - start
end
now_in_ms() click to toggle source
# File lib/statue/clock.rb, line 6
def now_in_ms
  Process.clock_gettime(Process::CLOCK_MONOTONIC) * 1_000
end