- replace internal get_time() calls with standard PHP5 microtime(true) calls in Smarty_Internal_Utility

This commit is contained in:
Uwe.Tews
2010-06-24 14:43:04 +00:00
parent 95869f258e
commit f99e09f588
2 changed files with 8 additions and 4 deletions

View File

@@ -1,3 +1,7 @@
24/06/2010
- replace internal get_time() calls with standard PHP5 microtime(true) calls in Smarty_Internal_Utility
22/06/2010 22/06/2010
- allow spaces between typecast and value in template syntax - allow spaces between typecast and value in template syntax
- bugfix get correct count of traversables in {foreach} tag - bugfix get correct count of traversables in {foreach} tag

View File

@@ -73,12 +73,12 @@ class Smarty_Internal_Utility {
} }
echo '<br>', $_dir, '---', $_template_file; echo '<br>', $_dir, '---', $_template_file;
flush(); flush();
$_start_time = $this->_get_time(); $_start_time = microtime(true);
try { try {
$_tpl = $this->smarty->createTemplate($_template_file); $_tpl = $this->smarty->createTemplate($_template_file);
if ($_tpl->mustCompile()) { if ($_tpl->mustCompile()) {
$_tpl->compileTemplateSource(); $_tpl->compileTemplateSource();
echo ' compiled in ', $this->_get_time() - $_start_time, ' seconds'; echo ' compiled in ', microtime(true) - $_start_time, ' seconds';
flush(); flush();
} else { } else {
echo ' is up to date'; echo ' is up to date';
@@ -131,12 +131,12 @@ class Smarty_Internal_Utility {
} }
echo '<br>', $_dir, '---', $_config_file; echo '<br>', $_dir, '---', $_config_file;
flush(); flush();
$_start_time = $this->_get_time(); $_start_time = microtime(true);
try { try {
$_config = new Smarty_Internal_Config($_config_file, $this->smarty); $_config = new Smarty_Internal_Config($_config_file, $this->smarty);
if ($_config->mustCompile()) { if ($_config->mustCompile()) {
$_config->compileConfigSource(); $_config->compileConfigSource();
echo ' compiled in ', $this->_get_time() - $_start_time, ' seconds'; echo ' compiled in ', microtime(true) - $_start_time, ' seconds';
flush(); flush();
} else { } else {
echo ' is up to date'; echo ' is up to date';