def with_timer(name)
      start = Time.now
      yield
      duration = Time.now - start
      # report in ms
      add_field(name, duration * 1000)
      self
    end
def with_timer(name)
      start = Time.now
      yield
      duration = Time.now - start
      # report in ms
      add_field(name, duration * 1000)
      self
    end
times the execution of a block and adds a field containing the duration in milliseconds

 @param name [String] the name of the field to add to the event
 @return [self] this event.
 @example
   event.with_timer "task_ms" do
     # something time consuming
   end