Module: PulsarSdk::Tweaks::TimeAtMicrosecond::ClassMethods

Defined in:
lib/pulsar_sdk/tweaks/time_at_microsecond.rb

Instance Method Summary collapse

Instance Method Details

#at_timestamp(v) ⇒ Object



15
16
17
18
# File 'lib/pulsar_sdk/tweaks/time_at_microsecond.rb', line 15

def at_timestamp(v)
  second, micro = v.divmod(1000)
  self.at(second, micro * 1000)
end