Skip to content

Commit

Permalink
Merge pull request #264 from nobu/drop-ruby1.6
Browse files Browse the repository at this point in the history
Drop code for Ruby 1.6
  • Loading branch information
nobu committed Apr 30, 2024
2 parents 3cc23ce + 30f1512 commit 7a3bd89
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions bin/racc
Expand Up @@ -279,19 +279,13 @@ class RaccProfiler
def initialize(really)
@really = really
@log = []
unless ::Process.respond_to?(:times)
# Ruby 1.6
@class = ::Time
else
@class = ::Process
end
end

def section(name)
if @really
t1 = @class.times.utime
t1 = ::Process.times.utime
result = yield
t2 = @class.times.utime
t2 = ::Process.times.utime
@log.push [name, t2 - t1]
result
else
Expand Down

0 comments on commit 7a3bd89

Please sign in to comment.