public function Twig_Profiler_Profile::getDuration in Translation template extractor 7.3
Returns the duration in microseconds.
Return value
int
File
- vendor/
Twig/ Profiler/ Profile.php, line 87
Class
- Twig_Profiler_Profile
- @author Fabien Potencier <fabien@symfony.com>
Code
public function getDuration() {
if ($this
->isRoot() && $this->profiles) {
// for the root node with children, duration is the sum of all child durations
$duration = 0;
foreach ($this->profiles as $profile) {
$duration += $profile
->getDuration();
}
return $duration;
}
return isset($this->ends['wt']) && isset($this->starts['wt']) ? $this->ends['wt'] - $this->starts['wt'] : 0;
}