module ImageOptim::ElapsedTime

Use Process.clock_gettime if available to get time more fitting to calculate elapsed time

Constants

CLOCK_ID
CLOCK_NAME

Public Instance Methods

now() click to toggle source
# File lib/image_optim/elapsed_time.rb, line 18
def now
  if CLOCK_ID
    Process.clock_gettime(CLOCK_ID)
  else
    Time.now.to_f
  end
end