code: function resetPolling(newIntervalInMinutes) {
      if (pollTimerID != null) {
          clearTimeout(pollTimerID);
      }
      pollTimerID = null;
      if (newIntervalInMinutes == null) {
          const settings = pi.setting.getSettings();
          newIntervalInMinutes = settings.Periodical.pollInterval;
      }
      if (typeof newIntervalInMinutes == 'number') {
          const curDate = new Date();
          // Align by nearest hour
          const alignedDate = new Date(
              curDate.getFullYear(), curDate.getMonth(), curDate.getDate(), curDate.getHours());
          const millisDiff = curDate.getTime() - alignedDate.getTime();
          let nextTiming = 0;
          while (nextTiming < millisDiff) {
              nextTiming += newIntervalInMinutes * 60*1000;
          }
          if (nextTiming >= 60*60*1000) {
              nextTiming = 60*60*1000;
          }
          pollTimerID
              = setTimeout(runPollScript
                  , nextTiming - millisDiff + 1000 /* margin*/);
      }
  }
docs: //////////////////////////////// Periodical logging Start polling for periodic log