Jyxo\Timer::start PHP 메소드

start() 공개 정적인 메소드

Starts measuring. Returns timer name.
public static start ( string $name = '' ) : string
$name string Custom timer name
리턴 string
    public static function start(string $name = '') : string
    {
        $start = microtime(true);
        if (empty($name)) {
            $name = md5($start . rand(0, 100));
        }
        self::$starts[$name] = $start;
        return $name;
    }

Usage Example

예제 #1
0
파일: Client.php 프로젝트: JerryCR/php-2
 /**
  * Starts profiling.
  *
  * @return \Jyxo\Rpc\Client
  */
 protected function profileStart()
 {
     // Set start time
     if ($this->profiler) {
         $this->timer = \Jyxo\Timer::start();
     }
     return $this;
 }
All Usage Examples Of Jyxo\Timer::start