Changeset 33967 in osm for applications/editors
- Timestamp:
- 2017-12-30T08:05:03+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/photo_geotagging/src/org/openstreetmap/josm/plugins/photo_geotagging/GeotaggingAction.java
r33878 r33967 236 236 progressMonitor.subTask(tr("Writing position information to image files...")); 237 237 progressMonitor.setTicksCount(images.size()); 238 239 final long startTime = System.currentTimeMillis(); 238 240 239 241 currentIndex = 0; … … 276 278 } 277 279 progressMonitor.worked(1); 280 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)); 293 278 294 if (debug) { 279 295 System.err.println("finished " + e.getFile());
Note:
See TracChangeset
for help on using the changeset viewer.