anchor.diff:                                  end,
                                   false
                           end
  -                    end,
  -                    {S#state{waiting=queue:filter(F, S#state.waiting)}, T}
  +                    end, S#state.waiting),
  +                    case queue:is_empty(Waitings) of
  +                        true -> {S#state{waiting=Waitings}, infinity};
  +                        false -> {S#state{waiting=Waitings}, T}
  +                    end
               end
       end.
  
positive.code: 
  handle_info(timeout, S=#state{}) ->
      NewState = maybe_push_message(S),
      lager:debug("number of waitings: ~p", [queue:len(NewState#state.waiting)]),
      {State, Sleep} = prepare_sleep(NewState),
      {noreply, State, Sleep};
  
  
negative.code:                 0 -> {S, 0};
                  T ->
                      %% remove invalid waitings before sleeping
                      Waitings = queue:filter(fun(W=#waiting{}) ->
                          case wait_valid(W) of
                              true -> true;
                              false ->
  