Class: Bunny::Timestamp
- Inherits:
-
Object
- Object
- Bunny::Timestamp
- Defined in:
- lib/bunny/timestamp.rb
Overview
Abstracts away the Ruby (OS) method of retriving timestamps.
Class Method Summary collapse
Class Method Details
.monotonic ⇒ Object
12 13 14 |
# File 'lib/bunny/timestamp.rb', line 12 def self.monotonic Process.clock_gettime(Process::CLOCK_MONOTONIC) end |
.non_monotonic ⇒ Object
16 17 18 |
# File 'lib/bunny/timestamp.rb', line 16 def self.non_monotonic ::Time.now end |
.non_monotonic_utc ⇒ Object
20 21 22 |
# File 'lib/bunny/timestamp.rb', line 20 def self.non_monotonic_utc self.non_monotonic.utc end |
.now ⇒ Object
8 9 10 |
# File 'lib/bunny/timestamp.rb', line 8 def self.now ::Time.now end |