Exemplo n.º 1
0
 /**
  * Returns the time when the application started, as a UNIX timestamp 
  * with microseconds.
  * @return float
  */
 public static function getStartTime()
 {
     if (!isset(self::$startTime)) {
         self::$startTime = microtime(true);
     }
     return self::$startTime;
 }
Exemplo n.º 2
0
 /**
  * Returns the time when the application started, in seconds
  * elapsed since 01.01.1970 plus microseconds if available.
  * @return float
  */
 public static function getStartTime()
 {
     if (!isset(self::$startTime)) {
         if (function_exists('microtime')) {
             // microtime as float
             self::$startTime = microtime(true);
         } else {
             self::$startTime = floatval(time());
         }
     }
     return self::$startTime;
 }