anchor.diff:      end.
   
   poll_stat_change(Metric, OriginalValue) ->
  -    case folsom_metrics:get_metric_value(Metric) of
  -        OriginalValue -> 
  -            poll_stat_change(Metric, OriginalValue);
  -        _ ->
  -            ok
  +    {_, Secs, _} = os:timestamp(),
  +    poll_stat_change(Metric, OriginalValue, Secs+?POLL_TIMEOUT).
  +
  +poll_stat_change(Metric, OriginalValue, ExpireSecs) ->
  +    {_, Secs, _} = os:timestamp(),
  +    case Secs > ExpireSecs of
  +        true ->
  +            throw({error, {expired, Metric, OriginalValue}});
  +        false ->
  +            case folsom_metrics:get_metric_value(Metric) of
  +                OriginalValue -> 
  +                    poll_stat_change(Metric, OriginalValue, ExpireSecs);
  +                _ ->
  +                    ok
  +            end
       end.
   
   %% ====================================================================
  
positive.code: g_get_pid(#state{get_fsm = L}) ->
      oneof(L).
  
  precondition(#state{get_fsm = []}, {call, _, _Command, [get, _]}) ->
      false;
  precondition(#state{put_fsm = []}, {call, _, _Command, [put, _]}) ->
      false;
  precondition(_,_) ->
      true.
  
negative.code:         eqc:on_output(fun(Str, Args) -> io:format(user, Str, Args) end, P)).
  
  eqc_test_() ->
      error_logger:tty(false),
      catch code:purge(riak_kv_stat_sj),
      catch code:delete(riak_kv_stat_sj),
      net_kernel:stop(),
      net_kernel:start(['test-master@127.0.0.1', 'longnames']),
      erlang:set_cookie(node(), ayo),
      {node, 'tester@127.0.0.1', "-setcookie ayo", 
       [
           {timeout, 120, [?_assertEqual(true, quickcheck(eqc:testing_time(90,
                             ?QC_OUT(prop()))))]}
         ]}.
  
  test() ->
      test(100).
  