本文整理汇总了PHP中Timer::logTime方法的典型用法代码示例。如果您正苦于以下问题:PHP Timer::logTime方法的具体用法?PHP Timer::logTime怎么用?PHP Timer::logTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Timer
的用法示例。
在下文中一共展示了Timer::logTime方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: logTime
function logTime($message)
{
if (false) {
$this->timer->logTime($message);
}
}
示例2: Timer
// Set up autoloader (needed for YAML)
function vufind_autoloader($class)
{
$fullClassName = str_replace('_', '/', $class) . '.php';
require $fullClassName;
}
spl_autoload_register('vufind_autoloader');
}
global $timer;
if (empty($timer)) {
$timer = new Timer(microtime(false));
}
// Retrieve values from configuration file
require_once ROOT_DIR . '/sys/ConfigArray.php';
$configArray = readConfig();
$timer->logTime("Read config");
if (isset($configArray['System']['timings'])) {
$timer->enableTimings($configArray['System']['timings']);
}
//Start a logger
$logger = new Logger();
//Update error handling
if ($configArray['System']['debug']) {
ini_set('display_errors', true);
error_reporting(E_ALL & ~E_DEPRECATED);
}
date_default_timezone_set($configArray['Site']['timezone']);
$timer->logTime("bootstrap");
//Create the QR Code if it doesn't exit
$type = $_REQUEST['type'];
$id = $_REQUEST['id'];
示例3: microtime
global $errorHandlingEnabled;
$errorHandlingEnabled = true;
$startTime = microtime(true);
require_once ROOT_DIR . '/sys/Logger.php';
require_once ROOT_DIR . '/sys/PEAR_Singleton.php';
PEAR_Singleton::init();
require_once ROOT_DIR . '/sys/ConfigArray.php';
require_once ROOT_DIR . '/sys/Utils/SwitchDatabase.php';
global $configArray;
$configArray = readConfig();
require_once ROOT_DIR . '/sys/Timer.php';
global $timer;
$timer = new Timer($startTime);
global $logger;
$logger = new Logger();
$timer->logTime("Read Config");
if ($configArray['System']['debug']) {
ini_set('display_errors', true);
error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT);
}
//Use output buffering to allow session cookies to have different values
// this can't be determined before session_start is called
ob_start();
initMemcache();
initDatabase();
requireSystemLibraries();
initLocale();
// Sets global error handler for PEAR errors
PEAR_Singleton::setErrorHandling(PEAR_ERROR_CALLBACK, 'handlePEARError');
loadLibraryAndLocation();
loadSearchInformation();
示例4: logTime
function logTime($message)
{
if ($this->doTimings) {
$this->timer->logTime($message);
}
}