This file defines a $log variable for logging, and a time() method for recording timing information.
[Source]
# File lib/rubygems/timer.rb, line 17 17: def timetime(msg, width=25) 18: t = Time.now 19: return_value = yield 20: elapsed = Time.now.to_f - t.to_f 21: elapsed = sprintf("%3.3f", elapsed) 22: $log.debug "#{msg.ljust(width)}: #{elapsed}s" 23: return_value 24: end
[Validate]