timer_start(); } function timer_start() { if (defined("PAGE_PARSE_START_TIME")) { $this->timer_start = PAGE_PARSE_START_TIME; } else { $this->timer_start = microtime(); } } function timer_stop($display = 'false') { $this->timer_stop = microtime(); $time_start = explode(' ', $this->timer_start); $time_end = explode(' ', $this->timer_stop); $this->timer_total = number_format(($time_end[1] + $time_end[0] - ($time_start[1] + $time_start[0])), 3); $this->write(getenv('REQUEST_URI'), $this->timer_total . 's'); if ($display == 'true') { return $this->timer_display(); } } function timer_display() { return 'Parse Time: ' . $this->timer_total . 's'; } function write($message, $type) { error_log(strftime(STORE_PARSE_DATE_TIME_FORMAT) . ' [' . $type . '] ' . $message . "\n", 3, STORE_PAGE_PARSE_TIME_LOG); } } ?>