/** * @param \Runalyze\View\Activity\Context $context * @return array */ protected function computeRounds(Activity\Context $context) { $Loop = new Trackdata\Loop($context->trackdata()); $Rounds = array(); do { $Loop->nextDistance(); $Rounds[] = array('km' => $Loop->difference(Trackdata\Object::DISTANCE), 's' => $Loop->difference(Trackdata\Object::TIME)); } while (!$Loop->isAtEnd()); return $Rounds; }