anchor.diff:                                StepInterval::non_neg_integer(),
                                 NewInterval::non_neg_integer()).
   decr_interval_fun(Interval, StepInterval) ->
  -    Interval_1 = Interval - StepInterval,
  -    case (Interval_1 < ?DEF_CONSUME_MIN_INTERVAL) of
  -        true ->
  -            ?DEF_CONSUME_MIN_INTERVAL;
  -        false ->
  -            Interval_1
  -    end.
  +    erlang:max((Interval - StepInterval), ?DEF_CONSUME_MIN_INTERVAL).
   
   
   %% @doc Increase the num of messages/batch-proccessing
  
positive.code:                               StepInterval::non_neg_integer(),
                                NewInterval::non_neg_integer()).
  incr_interval_fun(Interval, MaxInterval, StepInterval) ->
      Interval_1 = Interval + StepInterval,
      case (Interval_1 > MaxInterval) of
          true ->
              MaxInterval;
          false ->
              Interval_1
      end.
  
  
  %% @doc Decrease the waiting time
  
negative.code:                                 StepBatchProcs::non_neg_integer(),
                                  NewBatchProcs::non_neg_integer()).
  incr_batch_procs_fun(BatchProcs, MaxBatchProcs, StepBatchProcs) ->
      erlang:min((BatchProcs + StepBatchProcs), MaxBatchProcs).
  
  
  %% @doc decrease the num of messages/batch-proccessing
  