anchor.diff:  %% @doc
   connect(Conn) -> cast({connect, Conn, now()}).
   
  +-spec connected() -> [{pid(), non_neg_integer()}].
  +%% @doc
  +connected() -> call(connected).
  +
   -spec counter(atom(), pos_integer()) -> ok.
   %% @doc
   counter(Stat, Step) -> cast({counter, Stat, Step}).
  
positive.code:                  normal -> disconnect.soft;
                   _Other -> disconnect.hard
               end,
      stat(State, timer, duration, now_diff(now(), Started)),
      stat(State, counter, Status, 1),
      {noreply, State}.
  
  
negative.code: %% @private
  cast(Msg) -> gen_server:cast(?MODULE, Msg).
  
  -spec call(message()) -> ok.
  %% @private
  call(Msg) -> gen_server:call(?MODULE, Msg).
  
  -spec elapsed(erlang:timestamp()) -> non_neg_integer().
  %% @private Get the difference in milliseconds now and a timestamp
  elapsed(T) -> trunc(timer:now_diff(now(), T) / 1000).
  
  -spec stat(#s{}, counter | timer, string() | atom(), pos_integer(), float()) -> ok.
  %% @private Create a statistic entry with a sample rate
  