" * @license GPLv2 * @package generis * */ class helpers_TimeOutHelper { const LONG = 200; const MEDIUM = 100; const SHORT = 30; const NO_TIMEOUT = 0; public static function setTimeOutLimit($value = self::LONG) { $configValue = ini_get('max_execution_time'); if ($value > 0 && $configValue > 0) { set_time_limit(max($configValue, $value)); } else { set_time_limit(self::NO_TIMEOUT); } } public static function reset() { set_time_limit(ini_get('max_execution_time')); } }