I'm trying to calculate my min/km average of my total run.
Currently I have ran ($this->totaltime) 3113 seconds, ($this->distance) 6313.59 and my pace should be 08:13 min/km (yes this was very slow!)
Code I'm using:
// Pace
function getPace() {
$dis_pace = $this->distance / 1000;
$pace = $this->totaltime / $dis_pace / 60;
return $pace;
}
I think I'm missing something here..
[EDIT] The problem is I get 8.21 but need to have the results in time 08:13. [/EDIT]
Anybody?