class Raykit::Timer

Provides functionality to record the time execution times

def self.get_elapsed_str(elapsed,pad=0)

Converts a time span in seconds to a formatted string
def self.get_elapsed_str(elapsed,pad=0)
    #"[" + "%.0f" % (elapsed) + "s]".ljust(pad)

    "%.0f" % (elapsed) + "s".ljust(pad)
end

def elapsed

The elapsed time, in seconds, since the timer started
def elapsed
    return Time.now-@start_time
end

def elapsed_str(pad=0)

The elapsed time, in seconds, as a formatted string
def elapsed_str(pad=0)
    Timer.get_elapsed_str(elapsed,pad)
end

def initialize

def initialize
    @start_time=Time.now
end