本文整理匯總了PHP中CApp::chrono方法的典型用法代碼示例。如果您正苦於以下問題:PHP CApp::chrono方法的具體用法?PHP CApp::chrono怎麽用?PHP CApp::chrono使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CApp
的用法示例。
在下文中一共展示了CApp::chrono方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Chronometer
}
}
// Include config in DB
if (CAppUI::conf("config_db")) {
CMbConfig::loadValuesFromDB();
}
// Shutdown function
register_shutdown_function(array("CApp", "checkPeace"));
if (!@CSQLDataSource::get("std")) {
CApp::goOffline("db-access");
}
CMbPerformance::mark("init");
require __DIR__ . "/includes/session.php";
CMbPerformance::mark("session");
// Start chrono (after session_start as it may be locked by another request)
CApp::$chrono = new Chronometer();
CApp::$chrono->main = true;
CApp::$chrono->start();
$do_login = false;
// Load default preferences if not logged in
if (!CAppUI::$instance->user_id) {
CAppUI::loadPrefs();
try {
CApp::notify("UserAuthentication", true);
} catch (CUserAuthenticationFailure $e) {
CApp::rip();
} catch (CUserAuthenticationSuccess $e) {
CAppUI::$auth_info = $e;
$do_login = true;
}
}