def time(name, opts = {})
      opts[:ez] ||= true

      start = Time.now
      yield if block_given?

      if opts[:ez] == true
        ez_value(name, (Time.now - start))
      else
        value(name, (Time.now - start))
      end
    end
def time(name, opts = {})
      opts[:ez] ||= true

      start = Time.now
      yield if block_given?

      if opts[:ez] == true
        ez_value(name, (Time.now - start))
      else
        value(name, (Time.now - start))
      end
    end
Time a block of code and send the duration as a value

 @example
   StatHat.new.time('some identifying name') do
     # code
   end

 @param [String] name the name of the stat
 @param [Hash] opts a hash of options
 @option [Symbol] :ez Send data via the ez api (default: true)