Ignore:
Timestamp:
2020-01-23T22:57:46+01:00 (4 years ago)
Author:
simon04
Message:

Introduce Stopwatch class to measure elapsed time

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetReader.java

    r15072 r15755  
    4747import org.openstreetmap.josm.tools.I18n;
    4848import org.openstreetmap.josm.tools.Logging;
     49import org.openstreetmap.josm.tools.Stopwatch;
    4950import org.openstreetmap.josm.tools.Utils;
    5051import org.openstreetmap.josm.tools.XmlObjectParser;
     
    353354        Collection<TaggingPreset> tp;
    354355        Logging.debug("Reading presets from {0}", source);
    355         long startTime = System.currentTimeMillis();
     356        Stopwatch stopwatch = Stopwatch.createStarted();
    356357        try (
    357358            CachedFile cf = new CachedFile(source).setHttpAccept(PRESET_MIME_TYPES);
     
    368369        }
    369370        if (Logging.isDebugEnabled()) {
    370             Logging.debug("Presets read in {0}", Utils.getDurationString(System.currentTimeMillis() - startTime));
     371            Logging.debug("Presets read in {0}", stopwatch);
    371372        }
    372373        return tp;
Note: See TracChangeset for help on using the changeset viewer.