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) {
|
||||
if (rctx != null) {
|
||||
this.routingTime = rctx.routingTime;
|
||||
this.visitedSegments = rctx.visitedSegments;
|
||||
this.loadedTiles = rctx.loadedTiles;
|
||||
this.calculateTime = (float) (((System.nanoTime() - rctx.timeToCalculate) / 1e6) / 1000f);
|
||||
this.visitedSegments = rctx.getVisitedSegments();
|
||||
this.loadedTiles = rctx.getLoadedTiles();
|
||||
if (rctx.calculationProgress != null) {
|
||||
this.calculateTime = (float) (rctx.calculationProgress.timeToCalculate / 1.0e9);
|
||||
} else {
|
||||
this.calculateTime = 0;
|
||||
}
|
||||
} else {
|
||||
this.routingTime = 0;
|
||||
this.visitedSegments = 0;
|
||||
|
|
Loading…
Reference in a new issue