lib/stats/times.rb
def time(name, &block)
      raise ArgumentError.new("Block required to time.") unless block
      realtime = Benchmark.realtime { block.call }
      Stats.redis.rpush(name, realtime)
    end
# Adds a new time for the stat with the specified name.
Adds a new time for the stat with the specified name.
Adds a new time for the stat with the specified name .
def time(name, &block)
      raise ArgumentError.new("Block required to time.") unless block
      realtime = Benchmark.realtime { block.call }
      Stats.redis.rpush(name, realtime)
    end
def time ( name , & block ) raise ArgumentError . new ( "Block required to time." ) unless block realtime = Benchmark . realtime { block . call } Stats . redis . rpush ( name , realtime ) end
Adds a new time for the stat with the specified name.
Adds a new time for the stat with the specified name .
name
block