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
10 11 12 |
# File 'lib/bunny/timestamp.rb', line 10 def self.monotonic Process.clock_gettime(Process::CLOCK_MONOTONIC) end |
.non_monotonic ⇒ Object
14 15 16 |
# File 'lib/bunny/timestamp.rb', line 14 def self.non_monotonic ::Time.now end |
.non_monotonic_utc ⇒ Object
18 19 20 |
# File 'lib/bunny/timestamp.rb', line 18 def self.non_monotonic_utc self.non_monotonic.utc end |
.now ⇒ Object
6 7 8 |
# File 'lib/bunny/timestamp.rb', line 6 def self.now ::Time.now end |