startTimer(2000);
resetTimer(2000);
  private void updateTaskRateSensor(boolean publish) {    long now = System.currentTimeMillis();    long elapsed = now - then;    int newCount = tasksSubscription.getAddedCollection().size()      + tasksSubscription.getChangedCollection().size()      + tasksSubscription.getRemovedCollection().size();    then = now;    filteredTaskRate /= Math.exp(elapsed / TIME_CONSTANT);    filteredTaskRate += newCount;    if (publish) {      cancelTimer();      if (logger.isDebugEnabled()) logger.debug("newCount=" + newCount);      TaskRateTestCondition taskRate = (TaskRateTestCondition)        conditionService.getConditionByName(CONDITION_NAME);      if (taskRate != null) {        if (logger.isInfoEnabled()) logger.info("Setting " + CONDITION_NAME + " = " + filteredTaskRate);        taskRate.setValue(new Double(filteredTaskRate));        blackboard.publishChange(taskRate);      }      startTimer(2000);    }  }