Module: Cutoff::Timer
- Included in:
- Cutoff
- Defined in:
- lib/cutoff/timer.rb
Overview
Tracks the current time for cutoff
Instance Method Summary collapse
-
#now ⇒ Float
The current relative time.
Instance Method Details
#now ⇒ Float
The current relative time
If it is available, this will use a monotonic clock. This is a clock
that always moves forward in time and starts at an arbitrary point
(such as system startup time). If that is not available on this system,
Time.now
will be used.
This does not represent current real time
17 18 19 |
# File 'lib/cutoff/timer.rb', line 17 def now Process.clock_gettime(Process::CLOCK_MONOTONIC) end |