/** * Returns the time when the application started, in seconds * elapsed since 01.01.1970 plus microseconds if available. * * @return float * @static */ 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; }