anchor.diff:      {ok, Socket} = gen_udp:open(Port, [binary, {active, false}]),
       lager:info("UDP listener opened port at ~w [~p]", [Port, Socket]),
   
  +    % TODO: configurable interval
  +    Interval = 10 * 1000,
  +
  +    % TODO: maybe we want to synchronize the flush interval with
  +    % the wall clock time matching with the graphite aggregation
  +    {ok, Timer} = timer:send_interval(Interval, flush),
  +
       % TODO: handle exit/failure
       spawn_link(?MODULE, listen, [Self, Socket]),
  -    {noreply, State#state{socket=Socket}};
  +    {noreply, State#state{socket=Socket, timer=Timer}};
   
   handle_cast(_Msg, State) ->
       {noreply, State}.
  
positive.code: %% @spec terminate(Reason, State) -> void()
  %% @end
  %%--------------------------------------------------------------------
  terminate(_Reason, _State) ->
      ok.
  
  %%--------------------------------------------------------------------
  
negative.code:          terminate/2,
           code_change/3]).
  
  -record(state, {port, socket, counters, timers, gauges, sets, timer}).
  
  -define(DELIMITER_PIPE, <<"|">>).
  -define(DELIMITER_COLON, <<":">>).
  