/** * 初始化系统时间,只运行一次 */ public static function setup() { static $run = null; if ($run !== null) { return false; } if (isset($_REQUEST['debug'])) { if ($_REQUEST['debug'] == 'yes') { $type = array('default' => true); } else { $mytype = explode('|', $_REQUEST['debug']); $type = array('default' => true); foreach ($mytype as $item) { $type[$item] = true; } } Profiler::$open_type = $type; } $run = true; $profiler = Profiler::instance()->start('Core', 'PHP Framework Start'); Profiler::$_marks[$profiler->get_token()] = array('group' => 'Core', 'name' => 'PHP Framework Start', 'start_time' => START_TIME, 'start_memory' => START_MEMORY, 'stop_time' => false, 'stop_memory' => false); $profiler->stop(); return null; }