anchor.diff:               end
                || {Sid, Active, Total} <- wall_time_diff(PrevSched, NewSched)],
               {noreply, S#state{timer_ref=erlang:start_timer(D, self(), ?TIMER_MSG),
  -                              prev_sched=NewSched, prev_io={In,Out}, prev_gc=GC}};
  +                              prev_sched=NewSched, prev_io=IO, prev_gc=GC}};
           _ -> % disabled or unavailable
               {noreply, S#state{timer_ref=erlang:start_timer(D, self(), ?TIMER_MSG),
  -                              prev_io={In,Out}, prev_gc=GC}}
  +                              prev_io=IO, prev_gc=GC}}
       end;
   handle_info(_Msg, {state, _Key, _TimerRef, _Delay}) ->
       exit(forced_upgrade_restart);
  
positive.code: init({Sink, BaseKey}) ->
      {ok, Delay} = application:get_env(vmstats, delay),
      Ref = erlang:start_timer(Delay, self(), ?TIMER_MSG),
      {{input,In},{output,Out}} = erlang:statistics(io),
      PrevGC = erlang:statistics(garbage_collection),
  
      State = #state{key = [BaseKey, $.],
                     sink = Sink,
                     timer_ref = Ref,
                     delay = Delay,
                     prev_io = {In, Out},
                     prev_gc = PrevGC},
  
      case {sched_time_available(), application:get_env(vmstats, sched_time)} of
          {true, {ok,true}} ->
  
negative.code:     catch
          error:badarg -> false
      end.
  
  write_io_stats(Sink, Key, #state{prev_io = {PrevIn, PrevOut}}) ->
      {{input, In}, {output, Out}} = erlang:statistics(io),
      Sink:increment([Key, "bytes_in"], In - PrevIn, 1.00),
      Sink:increment([Key, "bytes_out"], Out - PrevOut, 1.00),
      {In, Out}.
  
  write_gc_stats(Sink, Key, #state{prev_gc = {PrevGCs, PrevWords}}) ->
      {GCs, Words, _} = erlang:statistics(garbage_collection),
      Sink:increment([Key, "count"], GCs - PrevGCs, 1.00),
      Sink:increment([Key, "words_reclaimed"], Words - PrevWords, 1.00),
      {GCs, Words}.
  