1 backup.class.inc | protected Backup::timeoutCheck() |
Determines if time for a page execution has run out.
File
- core/
includes/ backup/ backup.class.inc, line 258 - Contains the Backup base class.
Class
- Backup
- Base class for creating backups.
Code
protected function timeoutCheck() {
// Max execution of 0 means unlimited.
if (ini_get('max_execution_time') == 0) {
return FALSE;
}
// Figure out when we should stop execution.
$backup_max_time = max(ini_get('max_execution_time'), $this->settings['backup_max_time']);
$timeout = (!empty($_SERVER['REQUEST_TIME']) ? $_SERVER['REQUEST_TIME'] : time()) + $backup_max_time - $this->settings['backup_timeout_buffer'];
return (time() > $timeout);
}