Class: NulogyMessageBusConsumer::Clock

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

Overview

Note: Since this calls Time.zone, it is NOt thread-safe

Instance Method Summary collapse

Instance Method Details

#msObject

milliseconds since epoch



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

def ms
  now.strftime("%Q").to_i
end

#nowObject



4
5
6
# File 'lib/nulogy_message_bus_consumer/clock.rb', line 4

def now
  Time.zone.now.to_datetime
end