aboutsummaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
authorChad Little <clittle@users.sourceforge.net>2004-05-20 04:15:19 +0000
committerChad Little <clittle@users.sourceforge.net>2004-05-20 04:15:19 +0000
commit6922a44d2c50539955b5fa5b6aa48bed005daf8b (patch)
tree6c7901440334349e9a54384baa7e67c01ad1ee36 /functions
parent17d81ae57a5ccfd5c5b82d97a17ee0bcc536da54 (diff)
downloadphpicalendar-6922a44d2c50539955b5fa5b6aa48bed005daf8b.tar.gz
phpicalendar-6922a44d2c50539955b5fa5b6aa48bed005daf8b.tar.bz2
phpicalendar-6922a44d2c50539955b5fa5b6aa48bed005daf8b.zip
Added template generation time.
Diffstat (limited to 'functions')
-rw-r--r--functions/ical_parser.php2
-rw-r--r--functions/template.php8
2 files changed, 7 insertions, 3 deletions
diff --git a/functions/ical_parser.php b/functions/ical_parser.php
index db5cb4e..89d380c 100644
--- a/functions/ical_parser.php
+++ b/functions/ical_parser.php
@@ -1109,5 +1109,7 @@ if ($parse_file) {
if ($cal == $ALL_CALENDARS_COMBINED) {
$calendar_name = $all_cal_comb_lang;
}
+
+$template_started = getmicrotime();
?>
diff --git a/functions/template.php b/functions/template.php
index 7e8dc7a..7ef94cf 100644
--- a/functions/template.php
+++ b/functions/template.php
@@ -881,7 +881,7 @@ class Page {
}
function output() {
- global $template, $php_started, $lang, $enable_rss;
+ global $template, $php_started, $lang, $enable_rss, $template_started;
// Looks for {MONTH} before sending page out
preg_match_all ('!\{MONTH_([A-Z]*)\|?([+|-])([0-9]{1,2})\}!is', $this->page, $match);
@@ -908,8 +908,10 @@ class Page {
}
$php_ended = @getmicrotime();
- $generated = number_format(($php_ended-$php_started),3);
- $this->page = str_replace('{GENERATED}', $generated, $this->page);
+ $generated1 = number_format(($php_ended-$php_started),3);
+ $generated2 = number_format(($php_ended-$template_started),3);
+ $this->page = str_replace('{GENERATED1}', $generated1, $this->page);
+ $this->page = str_replace('{GENERATED2}', $generated2, $this->page);
if ($enable_rss != 'yes') {
$this->page = preg_replace('!<\!-- switch rss_powered on -->(.*)<\!-- switch rss_powered off -->!is', '', $this->page);
} else {

© 2014-2024 Faster IT GmbH | imprint | privacy policy