public boolean isTimeForNextRun(long nowNs) {
    if (nowNs - thresholdNs > lastExecutedAtNs) {
      lastExecutedAtNs = nowNs;
      return true;
    }
    return false;
  }
public boolean isTimeForNextRun(long nowNs)