• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisionef68cad8863f2269dfeb27eacb1c631abb8e28c7 (tree)
Time2014-11-30 07:42:41
Authorhenoheno <henoheno>
Commiterumorigu

Log Message

BugTrack2/251: Show more decent 'HTML convert time' (base patched by ioio)

Change Summary

Incremental Difference

--- a/lib/func.php
+++ b/lib/func.php
@@ -476,6 +476,14 @@ function getmicrotime()
476476 return ((float)$sec + (float)$usec);
477477 }
478478
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+
479487 // Get the date
480488 function get_date($format, $timestamp = NULL)
481489 {
--- a/lib/html.php
+++ b/lib/html.php
@@ -146,8 +146,8 @@ function catbody($title, $page, $body)
146146 }
147147 }
148148
149- $longtaketime = getmicrotime() - MUTIME;
150- $taketime = sprintf('%01.03f', $longtaketime);
149+ // Compat: 'HTML convert time' without time about MenuBar and skin
150+ $taketime = elapsedtime();
151151
152152 require(SKIN_FILE);
153153 }
--- a/skin/pukiwiki.skin.php
+++ b/skin/pukiwiki.skin.php
@@ -1,6 +1,6 @@
11 <?php
22 // 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 $
44 // Copyright (C)
55 // 2002-2006 PukiWiki Developers Team
66 // 2001-2002 Originally written by yu-ji
@@ -271,7 +271,7 @@ function _toolbar($key, $x = 20, $y = 20){
271271 <div id="footer">
272272 Site admin: <a href="<?php echo $modifierlink ?>"><?php echo $modifier ?></a><p />
273273 <?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.
275275 </div>
276276
277277 </body>
--- a/skin/tdiary.skin.php
+++ b/skin/tdiary.skin.php
@@ -902,7 +902,7 @@ function _toolbar($key, $x = 20, $y = 20){
902902 Site admin: <a href="<?php echo $modifierlink ?>"><?php echo $modifier ?></a><p />
903903 <?php echo S_COPYRIGHT ?>.
904904 Powered by PHP <?php echo PHP_VERSION ?><br />
905- HTML convert time: <?php echo $taketime ?> sec.
905+ HTML convert time: <?php echo elapsedtime() ?> sec.
906906
907907 </div><!-- class="footer" -->
908908