Changeset 2595:84b6d63767f6
- Timestamp:
- 11/29/13 09:23:08 (12 years ago)
- Branch:
- default
- Location:
- inc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/core/class.dc.core.php
r2577 r2595 39 39 public $rest; ///< <b>dcRestServer</b> dcRestServer object 40 40 public $log; ///< <b>dcLog</b> dcLog object 41 public $stime; ///< <b>float</b> starting time 41 42 42 43 private $versions = null; … … 59 60 public function __construct($driver, $host, $db, $user, $password, $prefix, $persist) 60 61 { 62 if (defined('DC_START_TIME')) { 63 $this->stime=DC_START_TIME; 64 } else { 65 $this->stime = microtime(true); 66 } 67 61 68 $this->con = dbLayer::init($driver,$host,$db,$user,$password,$persist); 62 69 … … 1471 1478 } 1472 1479 } 1480 1481 /** 1482 Return elapsed time since script has been started 1483 @param $mtime <b>float</b> timestamp (microtime format) to evaluate delta from 1484 current time is taken if null 1485 @return <b>float</b> elapsed time 1486 */ 1487 public function getElapsedTime ($mtime=null) { 1488 if ($mtime !== null) { 1489 return $mtime-$this->stime; 1490 } else { 1491 return microtime(true)-$this->stime; 1492 } 1493 } 1473 1494 //@} 1495 1496 1497 1474 1498 } -
inc/prepend.php
r2567 r2595 10 10 # 11 11 # -- END LICENSE BLOCK ----------------------------------------- 12 13 /* Start tick */ 14 define('DC_START_TIME',microtime(true)); 12 15 13 16 /* ------------------------------------------------------------------------------------------- */
Note: See TracChangeset
for help on using the changeset viewer.