Waits up to the provided wait time for a confirmation is present on the page. This information
will be logged and recorded, with a screenshot for traceability and added
debugging support.

@param seconds the number of seconds to wait
347622
public void confirmationPresent(double seconds) {
        try {
            double timeTook = popup(seconds);
            checkConfirmationPresent(seconds, timeTook);
        } catch (TimeoutException e) {
            checkConfirmationPresent(seconds, seconds);
        }
    }
934828
public void await() throws ProcessHandlerException {
    try {
      if (message != null
          && timeoutSeconds != 0
          && !waitLatch.await(timeoutSeconds, TimeUnit.SECONDS)) {
        throw new ProcessHandlerException(
            "Timed out waiting for the success message: '" + message + "'");
      }
      if (exited) {
        throw new ProcessHandlerException("Process exited before success message");
      }
    } catch (InterruptedException e) {
      throw new ProcessHandlerException(e);
    } finally {
      waitLatch.countDown();
    }
  }
725210
private double popup(double seconds) {
        // wait for up to XX seconds for the error message
        double end = System.currentTimeMillis() + (seconds * 1000);
        WebDriverWait wait = new WebDriverWait(app.getDriver(), (long) seconds, DEFAULT_POLLING_INTERVAL);
        wait.until(ExpectedConditions.alertIsPresent());
        return Math.min((seconds * 1000) - (end - System.currentTimeMillis()), seconds * 1000) / 1000;
    }
1084865
public void waitUntilAllReceived(int timeout) throws ExternalFrameConfirmationException {
        try {
            byte flag = ExternalFrameConfirmationCheck.getConfirmation(ab, timeout);
            assert (flag == ExternalFrameHandler.CONFIRM_READING_DONE);
        } catch (TimeoutException ex) {
            throw new ExternalFrameConfirmationException("Timeout for confirmation exceeded!");
        } catch (InterruptedException e) {
            throw new ExternalFrameConfirmationException("Confirmation thread interrupted!");
        } catch (ExecutionException e) {
            throw new ExternalFrameConfirmationException("Confirmation failed!");
        }
    }
1365528
def wait(*args, **kwargs):
    
    kwargs.setdefault('sleep_seconds', (1, None))
    kwargs.setdefault('expected_exceptions', WebDriverException)
    kwargs.setdefault('timeout_seconds', webium.settings.wait_timeout)

    return wait_lib(*args, **kwargs)
881690
public static String secondToTime(int seconds) {
		if (seconds < 0) {
			throw new IllegalArgumentException("Seconds must be a positive number!");
		}

		int hour = seconds / 3600;
		int other = seconds % 3600;
		int minute = other / 60;
		int second = other % 60;
		final StringBuilder sb = new StringBuilder();
		if (hour < 10) {
			sb.append("0");
		}
		sb.append(hour);
		sb.append(":");
		if (minute < 10) {
			sb.append("0");
		}
		sb.append(minute);
		sb.append(":");
		if (second < 10) {
			sb.append("0");
		}
		sb.append(second);
		return sb.toString();
	}
1329341
public function setReceiveTimeout($seconds = null)
    {
        if (is_integer($seconds)) {
            $this->_rxtimeout = $seconds;
        } else {
            $this->_rxtimeout = self::DEF_TX_RX_TIMEOUT;
        }
        return $this->_rxtimeout;
    }
719959
public void alertNotPresent(double seconds) {
        try {
            double timeTook = noPopup(seconds);
            checkAlertNotPresent(seconds, timeTook);
        } catch (TimeoutException e) {
            checkAlertNotPresent(seconds, seconds);
        }
    }
1068420
public function wait($seconds = 30) {
        $seconds = max(0, intval($seconds));
        $this->commands = array_merge($this->commands, array("wait" => min($seconds, 30), "total_wait" => $seconds));
        return $this;
    }
216517
public void waitDone() throws ResponseTimeoutException,
            InvalidResponseException {
        lock.lock();
        try {
            if (!isDoneResponse()) {
                try {
                    condition.await(timeout, TimeUnit.MILLISECONDS);
                } catch (InterruptedException e) {
                    Thread.currentThread().interrupt();
                    throw new RuntimeException("Interrupted");
                }
            }
            
            if (illegalResponseException != null) {
                throw illegalResponseException;
            }
            
            if (!isDoneResponse()) {
                throw new ResponseTimeoutException("No response after " + timeout
                        + " millis");
            }
        } finally {
            lock.unlock();
        }
    }
482731
def wait(self, duration=None, count=0):
        
        start = time.time()
        total = 0
        while True:
            type, result = self._recv(MSG, PING, OK)
            if type is MSG:
                total += 1
                if self._handle_msg(result) is False:
                    break

                if count and total >= count:
                    break

            elif type is PING:
                self._handle_ping()

            if duration and time.time() - start > duration:
                break
822656
private void waitForEventOrTimeout() throws InterruptedException {
        long remainingWait = timeout - timeWaited;
        long millisToWait = remainingWait / 1000000;
        int nanosToWait = (int) (remainingWait % 1000000);
        wait(millisToWait, nanosToWait);
    }
1028237
def wait(self, timeout=None):
        """"""
        self._event.wait(timeout)
        return self._event.isSet()
903867
@Override
	public void setTransactionTimeout(int seconds) throws TransactionManagementException {
		logger.entering(CLASSNAME, "setTransactionTimeout", seconds);
		try {
			userTran.setTransactionTimeout(seconds);
		} catch (SystemException e) {
			throw new TransactionManagementException(e);
		}
		logger.exiting(CLASSNAME, "setTransactionTimeout");
	}
146313
public boolean setTransactionTimeout(final int seconds) throws XAException {

        final String methodName = "recover";
        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.entry(this, TRACE, methodName, seconds);
        }

        final boolean result = _siXaResource.setTransactionTimeout(seconds);

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.exit(this, TRACE, methodName, Boolean.valueOf(result));
        }
        return result;
    }
145379
public void promptNotPresent(double seconds) {
        try {
            double timeTook = noPopup(seconds);
            checkPromptNotPresent(seconds, timeTook);
        } catch (TimeoutException e) {
            checkPromptNotPresent(seconds, seconds);
        }
    }
1127137
@Override
    public boolean setTransactionTimeout(final int _seconds)
    {
        if (JCRStoreResource.LOG.isDebugEnabled()) {
            JCRStoreResource.LOG.debug("setTransactionTimeout (seconds = " + _seconds + ")");
        }
        return true;
    }