2
# This file defines a $log variable for logging, and a time() method for recording timing
6
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
8
# See LICENSE.txt for permissions.
17
def time(msg, width=25)
20
elapsed = Time.now.to_f - t.to_f
21
elapsed = sprintf("%3.3f", elapsed)
22
$log.debug "#{msg.ljust(width)}: #{elapsed}s"