Replaced timings in the footer with a visual for the Server-Timing header.

This commit is contained in:
flash 2025-04-03 19:40:10 +00:00
parent ceb6bece09
commit 83068a4183
Signed by: flash
GPG key ID: 2C9C2C574D47FE3E
17 changed files with 246 additions and 65 deletions

View file

@ -407,5 +407,5 @@ try {
}
} finally {
unlink($cronPath);
echo 'Took ' . number_format(microtime(true) - MSZ_STARTUP, 5) . 'ms.' . PHP_EOL;
printf('Took %.5fms.%s', ((float)hrtime(true) - MSZ_STARTUP) / 1000000, PHP_EOL);
}

View file

@ -86,8 +86,4 @@ $ctx = $msz->tplCtx->loadTemplate(implode(' ', array_slice($argv, $pathIndex)));
foreach($tplArgs as $name => $value)
$ctx->setVar($name, $value);
// things expect this to be defined which is also a bit yucky
if(!defined('MSZ_TPL_RENDER'))
define('MSZ_TPL_RENDER', microtime(true));
echo $ctx->render();