private void runPoll() { long now = System.currentTimeMillis(); long diff = (now - DM.I.getConfiguration().getInternLastPollTime()) / 1000; DM.I.getConfiguration().setInternLastPollTime(now); Log.d(LOGT, "Received poll request. Last poll was " + diff + "s ago"); mNagiosPollHandler.poll(); }
@Override public void onStart(Intent intent, int startId) { super.onStart(intent, startId); DM.I.getPollHandler().poll(); }
public String getLastPollTimeSuccessfullText() { return "Last successfull update was " + Millis.msToText( System.currentTimeMillis() - DM.I.getConfiguration().getInternLastPollTimeSuccessfull()) + " ago"; }