diff options
Diffstat (limited to 'lib/dtas.rb')
-rw-r--r-- | lib/dtas.rb | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/lib/dtas.rb b/lib/dtas.rb index 1eac704..eb8f49d 100644 --- a/lib/dtas.rb +++ b/lib/dtas.rb @@ -1,4 +1,4 @@ -# Copyright (C) 2013-2020 all contributors <dtas-all@nongnu.org> +# Copyright (C) all contributors <dtas-all@nongnu.org> # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt> # frozen_string_literal: true @@ -9,15 +9,8 @@ module DTAS # try to use the monotonic clock in Ruby >= 2.1, it is immune to clock # offset adjustments and generates less garbage (Float vs Time object) # :stopdoc: - begin + def self.now # :nodoc: ::Process.clock_gettime(::Process::CLOCK_MONOTONIC) - def self.now # :nodoc: - ::Process.clock_gettime(::Process::CLOCK_MONOTONIC) - end - rescue NameError, NoMethodError - def self.now # :nodoc: - Time.now.to_f # Ruby <= 2.0 - end end @null = nil @@ -48,7 +41,5 @@ module DTAS # :startdoc: end -require_relative 'dtas/compat_onenine' -require_relative 'dtas/spawn_fix' require_relative 'dtas/encoding' DTAS.extend(DTAS::Encoding) |