| @@ -68,10 +68,10 @@ | ||
| 68 | 68 | * @return self |
| 69 | 69 | */ |
| 70 | 70 | public function open(?string $id) |
| 71 | 71 | { |
| 72 | - if (null === $id || null === ($session = $this->get($id))) { | |
| 73 | - $session = $this->children[] = new self(\microtime(\true) * 1000, $this->morePrecision); | |
| 72 | + if (null === $id || null === $session = $this->get($id)) { | |
| 73 | + $session = $this->children[] = new self(microtime(\true) * 1000, $this->morePrecision); | |
| 74 | 74 | } |
| 75 | 75 | return $session; |
| 76 | 76 | } |
| 77 | 77 | /** |
| @@ -98,9 +98,9 @@ | ||
| 98 | 98 | */ |
| 99 | 99 | public function startEvent(string $name, ?string $category) |
| 100 | 100 | { |
| 101 | 101 | if (!isset($this->events[$name])) { |
| 102 | - $this->events[$name] = new StopwatchEvent($this->origin ?: \microtime(\true) * 1000, $category, $this->morePrecision, $name); | |
| 102 | + $this->events[$name] = new StopwatchEvent($this->origin ?: microtime(\true) * 1000, $category, $this->morePrecision, $name); | |
| 103 | 103 | } |
| 104 | 104 | return $this->events[$name]->start(); |
| 105 | 105 | } |
| 106 | 106 | /** |
| @@ -121,9 +121,9 @@ | ||
| 121 | 121 | */ |
| 122 | 122 | public function stopEvent(string $name) |
| 123 | 123 | { |
| 124 | 124 | if (!isset($this->events[$name])) { |
| 125 | - throw new \LogicException(\sprintf('Event "%s" is not started.', $name)); | |
| 125 | + throw new \LogicException(sprintf('Event "%s" is not started.', $name)); | |
| 126 | 126 | } |
| 127 | 127 | return $this->events[$name]->stop(); |
| 128 | 128 | } |
| 129 | 129 | /** |
| @@ -146,9 +146,9 @@ | ||
| 146 | 146 | */ |
| 147 | 147 | public function getEvent(string $name) |
| 148 | 148 | { |
| 149 | 149 | if (!isset($this->events[$name])) { |
| 150 | - throw new \LogicException(\sprintf('Event "%s" is not known.', $name)); | |
| 150 | + throw new \LogicException(sprintf('Event "%s" is not known.', $name)); | |
| 151 | 151 | } |
| 152 | 152 | return $this->events[$name]; |
| 153 | 153 | } |
| 154 | 154 | /** |