You are here

protected function Twig_Profiler_Dumper_Html::formatTime in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/twig/twig/lib/Twig/Profiler/Dumper/Html.php \Twig_Profiler_Dumper_Html::formatTime()

Overrides Twig_Profiler_Dumper_Text::formatTime

File

vendor/twig/twig/lib/Twig/Profiler/Dumper/Html.php, line 39

Class

Twig_Profiler_Dumper_Html
@author Fabien Potencier <fabien@symfony.com>

Code

protected function formatTime(Twig_Profiler_Profile $profile, $percent) {
  return sprintf('<span style="color: %s">%.2fms/%.0f%%</span>', $percent > 20 ? self::$colors['big'] : 'auto', $profile
    ->getDuration() * 1000, $percent);
}