Method: Datadog::Core::Utils::Time.as_utc_epoch_ns
- Defined in:
- lib/datadog/core/utils/time.rb
.as_utc_epoch_ns(time) ⇒ Object
56 57 58 59 60 |
# File 'lib/datadog/core/utils/time.rb', line 56 def as_utc_epoch_ns(time) # we use #to_r instead of #to_f because Float doesn't have enough precision to represent exact nanoseconds, see # https://rubyapi.org/3.0/o/time#method-i-to_f (time.to_r * 1_000_000_000).to_i end |