本文整理汇总了PHP中Timer::setStartTime方法的典型用法代码示例。如果您正苦于以下问题:PHP Timer::setStartTime方法的具体用法?PHP Timer::setStartTime怎么用?PHP Timer::setStartTime使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Timer
的用法示例。
在下文中一共展示了Timer::setStartTime方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: del_filters
}
//break;
}
}
mysqli_close($db_connect);
}
function del_filters()
{
$db_connect = mysqli_connect(host, user, pass, db);
$query = "DELETE FROM goodshasfeature WHERE feature_id<>2 AND feature_id<>10 AND feature_id<>14";
mysqli_query($db_connect, $query);
mysqli_close($db_connect);
}
//////////////////////////////////////////
$runtime = new Timer();
$runtime->setStartTime();
echo "Deleteing old features... ";
set_time_limit(2000);
del_filters();
echo "Done!<br>";
export_filters();
$runtime->setEndTime();
echo "<br> runtime=" . $runtime->getRunTime() . " sec <br>";
//////////////////////////////////////////
/**
* Class Timer
* замеряем время выполнения скрипта
*/
class Timer
{
/**
示例2:
//draw the header
require_once APP_PATH . '/layout/header.php';
/*
* check for successful installation
*/
//check if installation is complete passed over by installer
if (isset($_GET['check'])) {
$loadavg->cleanUpInstaller();
} else {
//check installation has been cleaned up for security reasons
$loadavg->checkInstall();
}
/*
* start polling time to generate charts
*/
$timer->setStartTime();
// Setting page load start time
/*
* draw the current page view
*/
//grab the log diretory - needs to be dynamic really
//as this is also set in settings.ini.php !!!
$logdir = LOG_PATH;
//check to see if ip is banned before going on
$banned = false;
$flooding = false;
if (isset($settings['ban_ip']) && $settings['ban_ip'] == "true") {
$banned = $loadavg->checkIpBan();
if ($banned) {
//clean up session
$loadavg->logOut();