Update the profiles with the timing info and saves them.
Profile $profile The root profile:
Boolean $updateChildren Whether to update the children altogether:
private function saveStopwatchInfoInProfile(Profile $profile, $updateChildren) {
$profile
->getCollector('time')
->setEvents($this->stopwatch
->getSectionEvents($profile
->getToken()));
$this->profiler
->saveProfile($profile);
if ($updateChildren) {
foreach ($profile
->getChildren() as $child) {
$this
->saveStopwatchInfoInProfile($child, true);
}
}
}