Module: Datadog::Utils::Time

Defined in:
lib/ddtrace/utils/time.rb

Overview

Common database-related utility functions.

Constant Summary collapse

PROCESS_TIME_SUPPORTED =
Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.1.0')

Class Method Summary collapse

Class Method Details

.get_timeObject



9
10
11
# File 'lib/ddtrace/utils/time.rb', line 9

def get_time
  PROCESS_TIME_SUPPORTED ? Process.clock_gettime(Process::CLOCK_MONOTONIC) : ::Time.now.to_f
end