Changeset 35426 in osm for applications/editors/josm
- Timestamp:
- 2020-04-18T13:01:12+02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/photo_geotagging/src/org/openstreetmap/josm/plugins/photo_geotagging/GeotaggingAction.java
r34542 r35426 46 46 import org.openstreetmap.josm.tools.JosmRuntimeException; 47 47 import org.openstreetmap.josm.tools.Logging; 48 import org.openstreetmap.josm.tools.Utils; 48 49 49 50 /** … … 279 280 progressMonitor.worked(1); 280 281 281 float millisecsPerFile = ((float)(System.currentTimeMillis()-startTime))/((currentIndex+1)); // currentIndex starts at 0 282 int filesLeft = images.size()-currentIndex-1; 283 int secsLeft = (int)Math.ceil((millisecsPerFile*filesLeft/1000)); 284 String timeLeft; 285 if (secsLeft < 60) { 286 timeLeft = secsLeft + "s"; 287 } else if (secsLeft < 3600) { 288 timeLeft = secsLeft/60 + "min " + secsLeft%60 + "s"; 289 } else { 290 timeLeft = secsLeft/3600 + "h " + ((secsLeft)/60)%60 + "min " + secsLeft%60 + "s"; 291 } 292 progressMonitor.subTask(tr("Writing position information to image files... Estimated time left: {0}", timeLeft)); 282 float millisecondsPerFile = (float) (System.currentTimeMillis() - startTime) 283 / (currentIndex + 1); // currentIndex starts at 0 284 int filesLeft = images.size() - currentIndex - 1; 285 String timeLeft = Utils.getDurationString((long) Math.ceil(millisecondsPerFile * filesLeft)); 286 progressMonitor.subTask(tr("Writing position information to image files... Estimated time left: {0}", timeLeft)); 293 287 294 288 if (debug) {
Note:
See TracChangeset
for help on using the changeset viewer.