anchor.diff:      
       Rate = list_to_integer(couch_config:get("stats", "rate", "1000")),
       % TODO: Add timer_start to kernel start options.
  -    timer:apply_interval(Rate, ?MODULE, collect_sample, []).
  -    
  -terminate(_Reason, TRef) ->
  +    {ok, TRef} = timer:apply_after(Rate, ?MODULE, collect_sample, []),
  +    {ok, {TRef, Rate}}.
  +    
  +terminate(_Reason, {TRef, _Rate}) ->
       timer:cancel(TRef),
       ok.
   
  -handle_call(collect_sample, _, State) ->
  +handle_call(collect_sample, _, {_TRef, SampleInterval}) ->
  +    {ok, TRef} = timer:apply_after(SampleInterval, ?MODULE, collect_sample, []),
       % Gather new stats values to add.
       Incs = lists:map(fun({Key, Value}) ->
           {Key, {incremental, Value}}
  
positive.code:         end,
          ets:insert(?MODULE, {{Key, Rate}, NewAgg})
      end, ets:tab2list(?MODULE)),
      {reply, ok, State}.
  
  handle_cast(stop, State) ->
      {stop, normal, State}.
  
negative.code:     to_json_term(?MODULE:get(Key, Time)).
  
  collect_sample() ->
      gen_server:call(?MODULE, collect_sample, infinity).
  
  
  init(StatDescsFileName) ->
  