Module: ImageOptim::ElapsedTime
- Included in:
- Timer
- Defined in:
- lib/image_optim/elapsed_time.rb
Overview
Use Process.clock_gettime if available to get time more fitting to calculate elapsed time
Constant Summary collapse
- CLOCK_NAME =
%w[ CLOCK_UPTIME_RAW CLOCK_UPTIME CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC CLOCK_REALTIME ].find{ |name| Process.const_defined?(name) }
- CLOCK_ID =
CLOCK_NAME && Process.const_get(CLOCK_NAME)