Class: ClusterId::V1::Clock
- Inherits:
-
Object
- Object
- ClusterId::V1::Clock
- Defined in:
- lib/clusterid/v1/clock.rb
Overview
A millisecond clock which extracts time information from the Process
module.
Class Method Summary collapse
-
.now_ms ⇒ Integer
A millisecond timestamp since the Unix epoch.
Class Method Details
.now_ms ⇒ Integer
Returns A millisecond timestamp since the Unix epoch.
9 10 11 |
# File 'lib/clusterid/v1/clock.rb', line 9 def self.now_ms Process.clock_gettime Process::CLOCK_REALTIME, :millisecond end |