mTimer[$timer] = $this->parseMicro( microtime() ); } public function current( $timer = 'default' ) { return $this->mTimer[$timer] ?? 0; } public function stop( $timer = 'default' ) { return $this->current( $timer ); } public function elapsed( $timer = 'default' ) { return $this->parseMicro( microtime() ) - $this->mTimer[$timer]; } } /** * Create timer */ global $gBitTimer; if (!isset($gBitTimer)) { $gBitTimer = new BitTimer(); $gBitTimer->start(); }