Fix calculation
This commit is contained in:
parent
2b23c7e8ca
commit
386c7dc3f4
1 changed files with 7 additions and 3 deletions
|
@ -140,9 +140,13 @@ public class RouteCalculationResult {
|
||||||
OsmandApplication ctx, boolean leftSide, RoutingContext rctx, List<LocationPoint> waypoints, ApplicationMode mode) {
|
OsmandApplication ctx, boolean leftSide, RoutingContext rctx, List<LocationPoint> waypoints, ApplicationMode mode) {
|
||||||
if (rctx != null) {
|
if (rctx != null) {
|
||||||
this.routingTime = rctx.routingTime;
|
this.routingTime = rctx.routingTime;
|
||||||
this.visitedSegments = rctx.visitedSegments;
|
this.visitedSegments = rctx.getVisitedSegments();
|
||||||
this.loadedTiles = rctx.loadedTiles;
|
this.loadedTiles = rctx.getLoadedTiles();
|
||||||
this.calculateTime = (float) (((System.nanoTime() - rctx.timeToCalculate) / 1e6) / 1000f);
|
if (rctx.calculationProgress != null) {
|
||||||
|
this.calculateTime = (float) (rctx.calculationProgress.timeToCalculate / 1.0e9);
|
||||||
|
} else {
|
||||||
|
this.calculateTime = 0;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.routingTime = 0;
|
this.routingTime = 0;
|
||||||
this.visitedSegments = 0;
|
this.visitedSegments = 0;
|
||||||
|
|
Loading…
Reference in a new issue