private void updateRefreshTimer() {
    cancelRefreshTimer();
    if (getState().isRefreshEnabled()) {
      refreshRunnable = new MyRefreshRunnable(this);
      // if "schedule with fixed rate" is used, then after waking up from stand-by mode, events are generated for inactive period
      // it does not make sense
      myFuture = JobScheduler.getScheduler().scheduleWithFixedDelay(refreshRunnable,
                                                                    getState().getRefreshInterval() * 60L,
                                                                    getState().getRefreshInterval() * 60L,
                                                                    TimeUnit.SECONDS);
    }
  }
private void updateRefreshTimer()