show how long the backup took

This commit is contained in:
Ralf Becker 2019-02-18 13:41:42 +01:00
parent 3a51767b67
commit e089f4428f

View File

@ -123,11 +123,12 @@ if($_POST['backup'])
{
if (is_resource($f = $db_backup->fopen_backup()))
{
echo '<p align="center">'.lang('backup started, this might take a few minutes ...')."</p>\n".str_repeat(' ',4096);
echo '<p align="center">'.lang('backup started, this might take a few minutes ...')."</p>\n";
$starttime = microtime(true);
$db_backup->backup($f);
if(is_resource($f))
fclose($f);
$setup_tpl->set_var('error_msg',lang('backup finished'));
$setup_tpl->set_var('error_msg', lang('backup finished').': '. number_format(microtime(true)-$starttime, 1).'s');
/* Remove old backups. */
$cleaned_files = array();