protected function HtmlDumper::formatTime in Devel 4.x
Same name and namespace in other branches
- 8.3 webprofiler/src/Twig/Dumper/HtmlDumper.php \Drupal\webprofiler\Twig\Dumper\HtmlDumper::formatTime()
- 8 webprofiler/src/Twig/Dumper/HtmlDumper.php \Drupal\webprofiler\Twig\Dumper\HtmlDumper::formatTime()
- 8.2 webprofiler/src/Twig/Dumper/HtmlDumper.php \Drupal\webprofiler\Twig\Dumper\HtmlDumper::formatTime()
File
- webprofiler/
src/ Twig/ Dumper/ HtmlDumper.php, line 41
Class
- HtmlDumper
- Class HtmlDumper.
Namespace
Drupal\webprofiler\Twig\DumperCode
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);
}