Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // L'astuce est bien de récupérer l'instance StopWatch du container,
- // éventuellement via auto-injection (sous Symfony 4),
- // mais pas d'en créer une nouvelle (ie, new Stopwatch()...).
- $stopwatch = $this->container->get('debug.stopwatch');
- $stopwatch->start('mon_temps', 'netinfluence');
- // ...
- usleep(100);
- $stopwatch->stop('mon_temps');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement