Revision | ef68cad8863f2269dfeb27eacb1c631abb8e28c7 (tree) |
---|---|
Time | 2014-11-30 07:42:41 |
Author | henoheno <henoheno> |
Commiter | umorigu |
BugTrack2/251: Show more decent 'HTML convert time' (base patched by ioio)
@@ -476,6 +476,14 @@ function getmicrotime() | ||
476 | 476 | return ((float)$sec + (float)$usec); |
477 | 477 | } |
478 | 478 | |
479 | +// Elapsed time by second | |
480 | +//define('MUTIME', getmicrotime()); | |
481 | +function elapsedtime() | |
482 | +{ | |
483 | + $at_the_microtime = MUTIME; | |
484 | + return sprintf('%01.03f', getmicrotime() - $at_the_microtime); | |
485 | +} | |
486 | + | |
479 | 487 | // Get the date |
480 | 488 | function get_date($format, $timestamp = NULL) |
481 | 489 | { |
@@ -146,8 +146,8 @@ function catbody($title, $page, $body) | ||
146 | 146 | } |
147 | 147 | } |
148 | 148 | |
149 | - $longtaketime = getmicrotime() - MUTIME; | |
150 | - $taketime = sprintf('%01.03f', $longtaketime); | |
149 | + // Compat: 'HTML convert time' without time about MenuBar and skin | |
150 | + $taketime = elapsedtime(); | |
151 | 151 | |
152 | 152 | require(SKIN_FILE); |
153 | 153 | } |
@@ -1,6 +1,6 @@ | ||
1 | 1 | <?php |
2 | 2 | // PukiWiki - Yet another WikiWikiWeb clone. |
3 | -// $Id: pukiwiki.skin.php,v 1.52 2007/02/11 05:53:31 henoheno Exp $ | |
3 | +// $Id: pukiwiki.skin.php,v 1.53 2007/06/24 13:59:50 henoheno Exp $ | |
4 | 4 | // Copyright (C) |
5 | 5 | // 2002-2006 PukiWiki Developers Team |
6 | 6 | // 2001-2002 Originally written by yu-ji |
@@ -271,7 +271,7 @@ function _toolbar($key, $x = 20, $y = 20){ | ||
271 | 271 | <div id="footer"> |
272 | 272 | Site admin: <a href="<?php echo $modifierlink ?>"><?php echo $modifier ?></a><p /> |
273 | 273 | <?php echo S_COPYRIGHT ?>. |
274 | - Powered by PHP <?php echo PHP_VERSION ?>. HTML convert time: <?php echo $taketime ?> sec. | |
274 | + Powered by PHP <?php echo PHP_VERSION ?>. HTML convert time: <?php echo elapsedtime() ?> sec. | |
275 | 275 | </div> |
276 | 276 | |
277 | 277 | </body> |
@@ -902,7 +902,7 @@ function _toolbar($key, $x = 20, $y = 20){ | ||
902 | 902 | Site admin: <a href="<?php echo $modifierlink ?>"><?php echo $modifier ?></a><p /> |
903 | 903 | <?php echo S_COPYRIGHT ?>. |
904 | 904 | Powered by PHP <?php echo PHP_VERSION ?><br /> |
905 | - HTML convert time: <?php echo $taketime ?> sec. | |
905 | + HTML convert time: <?php echo elapsedtime() ?> sec. | |
906 | 906 | |
907 | 907 | </div><!-- class="footer" --> |
908 | 908 |