module SidekiqUniqueJobs::Timing
def clock_stamp
-
(Float)
-
def clock_stamp if Process.const_defined?("CLOCK_MONOTONIC") Process.clock_gettime(Process::CLOCK_MONOTONIC) else Time.now.to_f end end
def now_f
-
(Float)
-
Other tags:
- See: SidekiqUniqueJobs.now_f -
def now_f SidekiqUniqueJobs.now_f end
def time_source
-
(Integer)
-
def time_source -> { (clock_stamp * 1000).to_i } end
def timed
-
(yield return, Float)
-
def timed start_time = time_source.call [yield, time_source.call - start_time] end