2007-11-10 02:48:56 -05:00
|
|
|
#
|
2009-06-09 17:38:59 -04:00
|
|
|
# This file defines a $log variable for logging, and a time() method for
|
|
|
|
# recording timing information.
|
2007-11-10 02:48:56 -05:00
|
|
|
#
|
|
|
|
#--
|
|
|
|
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
|
|
|
|
# All rights reserved.
|
|
|
|
# See LICENSE.txt for permissions.
|
|
|
|
#++
|
|
|
|
|
2009-06-09 17:38:59 -04:00
|
|
|
require 'rubygems'
|
|
|
|
|
|
|
|
file, lineno = Gem.location_of_caller
|
|
|
|
|
|
|
|
warn "#{file}:#{lineno}:Warning: RubyGems' lib/rubygems/timer.rb deprecated and will be removed on or after June 2009."
|
2007-11-10 02:48:56 -05:00
|
|
|
|
|
|
|
$log = Object.new
|
2009-06-09 17:38:59 -04:00
|
|
|
|
|
|
|
# :stopdoc:
|
|
|
|
def $log.debug(message)
|
|
|
|
Gem.debug message
|
2007-11-10 02:48:56 -05:00
|
|
|
end
|
|
|
|
|
2009-06-09 17:38:59 -04:00
|
|
|
def time(msg, width=25, &block)
|
|
|
|
Gem.time(msg, width, &block)
|
2007-11-10 02:48:56 -05:00
|
|
|
end
|
2009-06-09 17:38:59 -04:00
|
|
|
# :startdoc:
|
2007-11-10 02:48:56 -05:00
|
|
|
|