added route calculating time

This commit is contained in:
Sem van der Hoeven
2021-01-06 20:48:45 +01:00
parent 023647d418
commit f3e636f586
2 changed files with 6 additions and 43 deletions

View File

@@ -74,9 +74,14 @@ public class Route implements Parcelable {
return this.imageURL;
}
public int calculateTotalTimeMinutes() {
// 5 km / h walking speed
return (int) ((totalDistance / 1000) / 5) * 60;
}
public int getTotalTime() {
//TODO calculate total time according to all locations in list
return totalTime;
}