anchor.diff:              end
       end.
   
  -%% @doc Sets the value at Key. Either specify a new value or an update function
  -%%      which generates the new value from the old one.
  +%% @doc Sets the value at Key inside the current process.
  +%%      Either specify a new value or an update function which generates the
  +%%      new value from the old one.
  +%%      If a new time slot is started by updating the value, then the rrd()
  +%%      record is send to the monitor process.
   -spec proc_set_value(Process::atom(), Key::key(),
                        NewValue_or_UpdateFun::term() | fun((Old::Value | undefined) -> New::Value)) -> ok.
  -proc_set_value(Process, Key, UpdateFun) when is_function(UpdateFun, 1)->
  +proc_set_value(Process, Key, UpdateFun) when is_function(UpdateFun, 1) ->
       InternalKey = to_internal_key(Key),
       OldValue = erlang:get(InternalKey),
       NewValue = UpdateFun(OldValue),
  
positive.code: 
  -type state() :: Table::tid() | atom().
  -type message() ::
      {proc_report, Process::atom(), Key::key(), OldValue::rrd:rrd(), Value::rrd:rrd()} |
      {web_debug_info, Requestor::comm:erl_local_pid()}.
  
  %% @doc Converts the given Key to avoid conflicts in erlang:put/get.
  
negative.code:     % note: it may happen that the new value created a new slot which already
      % discarded all logged data from the previous (unreported) time slot
      % -> send OldValue, too
      comm:send_local(MyMonitor, {report_rrd, Process, Key, OldValue, Value}).
  
  %% @doc Message handler when the rm_loop module is fully initialized.
  -spec on(message(), state()) -> state().
  on({report_rrd, Process, Key, OldValue, _NewValue}, Table) ->
      % note: reporting is always done when a new time slot is created
      % -> use the values from the old value
      TableIndex = {Process, Key},
      MyData = case ets:lookup(Table, TableIndex) of
                   [{TableIndex, X}] -> X;
                   []      ->
  