/** * Change the time to wait with the next request. * * @author David Pauli <*****@*****.**> * @param int time The time in ms every reload needs to wait until get new information. * @return boolean True if the change works, false if not. * @since 0.1.1 * @since 0.1.2 Throw warning with wrong parameters. * @since 0.1.2 Add error reporting. */ public static function setRequestWaitTime($time) { self::errorReset(); if (!InputValidator::isRangedInt($time, 0)) { Logger::warning("ep6\\RESTClient\nRequest time (" . $time . ") is not valid."); self::errorSet("RESTC-10"); return false; } self::$NEXT_RESPONSE_WAIT_TIME = $time; return true; }
/** * Change the time to wait with the next request. * * @author David Pauli <*****@*****.**> * @since 0.1.1 * @param int time The time in ms every reload needs to wait until get new information. * @return boolean True if the change works, false if not. * @api */ public static function setRequestWaitTime($time) { if (!InputValidator::isRangedInt($time, 0)) { return false; } self::$NEXT_RESPONSE_WAIT_TIME = $time; return true; }