Class: NulogyMessageBusConsumer::Clock
- Inherits:
-
Object
- Object
- NulogyMessageBusConsumer::Clock
- 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
-
#ms ⇒ Object
milliseconds since epoch.
- #now ⇒ Object
Instance Method Details
#ms ⇒ Object
milliseconds since epoch
9 10 11 |
# File 'lib/nulogy_message_bus_consumer/clock.rb', line 9 def ms now.strftime("%Q").to_i end |
#now ⇒ Object
4 5 6 |
# File 'lib/nulogy_message_bus_consumer/clock.rb', line 4 def now Time.zone.now.to_datetime end |