Class: ClusterId::V1::Clock

Inherits:
Object
  • Object
show all
Defined in:
lib/clusterid/v1/clock.rb

Overview

A millisecond clock which extracts time information from the Process module.

Since:

  • 1.0.0

Class Method Summary collapse

Class Method Details

.now_msInteger

Returns A millisecond timestamp since the Unix epoch.

Returns:

  • (Integer)

    A millisecond timestamp since the Unix epoch

Since:

  • 1.0.0



9
10
11
# File 'lib/clusterid/v1/clock.rb', line 9

def self.now_ms
  Process.clock_gettime Process::CLOCK_REALTIME, :millisecond
end