Changeset 18625 for branches/comu-ver2
- Timestamp:
- 2010/04/25 13:28:55 (14 years ago)
- Location:
- branches/comu-ver2/data/class
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/comu-ver2/data/class/SC_View.php
r18596 r18625 68 68 69 69 if(ADMIN_MODE == '1') { 70 $this->time_start = time();70 $this->time_start = SC_Utils_Ex::sfMicrotimeFloat(); 71 71 } 72 72 … … 135 135 $this->_smarty->display($template); 136 136 if(ADMIN_MODE == '1') { 137 $time_end = time();137 $time_end = SC_Utils_Ex::sfMicrotimeFloat(); 138 138 $time = $time_end - $this->time_start; 139 print("処理時間:" . $time . "秒");139 echo '処理時間: ' . round($time, 3) . 秒; 140 140 } 141 141 } -
branches/comu-ver2/data/class/util/SC_Utils.php
r18569 r18625 2333 2333 return (array)include_once $filenamePluginInfo; 2334 2334 } 2335 2336 /** 2337 * 現在の Unix タイムスタンプを float (秒単位) でマイクロ秒まで返す 2338 * 2339 * PHP4の上位互換用途。 2340 * FIXME PHP4でテストする。(現状全くテストしていない。) 2341 * @param SimpleXMLElement $pluginsXml プラグイン XML 2342 * @return integer ファイルに書き込まれたバイト数を返します。 2343 */ 2344 function sfMicrotimeFloat() { 2345 $microtime = microtime(true); 2346 if (is_string($microtime)) { 2347 list($usec, $sec) = explode(" ", microtime()); 2348 return ((float)$usec + (float)$sec); 2349 } 2350 return $microtime; 2351 } 2352 2335 2353 } 2336 2354 ?>
Note: See TracChangeset
for help on using the changeset viewer.