Skip to content

Commit

Permalink
Fix deprecated Benchmark.ms call
Browse files Browse the repository at this point in the history
  • Loading branch information
elektronaut committed Nov 8, 2024
1 parent 4d99a11 commit c287b86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/dis/logging.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module Dis
module Logging
def debug_log(message, &block)
result = nil
duration = Benchmark.ms { result = block.call }
duration = Benchmark.realtime { result = block.call } * 1000
logger.debug(format("[Dis] %<message>s (%<duration>.1fms)",
message:,
duration:))
Expand Down

0 comments on commit c287b86

Please sign in to comment.