本文整理汇总了PHP中PH7\Framework\Mvc\Model\Engine\Db::time方法的典型用法代码示例。如果您正苦于以下问题:PHP Db::time方法的具体用法?PHP Db::time怎么用?PHP Db::time使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PH7\Framework\Mvc\Model\Engine\Db
的用法示例。
在下文中一共展示了Db::time方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: stat
public function stat()
{
$iCountQueries = Db::queryCount();
$sRequest = nt('Request', 'Requests', $iCountQueries);
echo t('Time of the request: %0% | %1% %2% | Page executed in %3% seconds | Amount of memory allocated: %4%', Db::time(), $iCountQueries, $sRequest, Page::time(Registry::getInstance()->start_time, microtime(true)), memory_get_usage(true));
}
示例2: stat
/**
* Get stats from the benchmark.
*
* @return void HTML output.
*/
public function stat()
{
$iCountQueries = Db::queryCount();
$sRequest = nt('Query', 'Queries', $iCountQueries);
$sMicrotime = microtime(true) - Registry::getInstance()->start_time;
$sTime = Benchmark::readableElapsedTime($sMicrotime);
$iMemory = Benchmark::readableSize(memory_get_usage(true));
echo t('Queries time: %0% | %1% %2% | Generated in %3% | Memory allocated: %4%', Db::time(), $iCountQueries, $sRequest, $sTime, $iMemory);
}