Skip to content

v0.2.54..v0.2.55 changeset CropRandomCmd.cpp

Garret Voltz edited this page Aug 14, 2020 · 1 revision
diff --git a/hoot-rnd/src/main/cpp/hoot/rnd/cmd/CropRandomCmd.cpp b/hoot-rnd/src/main/cpp/hoot/rnd/cmd/CropRandomCmd.cpp
index 2aec8bd..0992fa7 100644
--- a/hoot-rnd/src/main/cpp/hoot/rnd/cmd/CropRandomCmd.cpp
+++ b/hoot-rnd/src/main/cpp/hoot/rnd/cmd/CropRandomCmd.cpp
@@ -22,7 +22,7 @@
  * This will properly maintain the copyright information. DigitalGlobe
  * copyrights will be updated automatically.
  *
- * @copyright Copyright (C) 2019 DigitalGlobe (http://www.digitalglobe.com/)
+ * @copyright Copyright (C) 2019, 2020 DigitalGlobe (http://www.digitalglobe.com/)
  */
 
 // Hoot
@@ -34,9 +34,11 @@
 #include <hoot/core/elements/OsmMap.h>
 #include <hoot/rnd/ops/RandomMapCropper.h>
 #include <hoot/core/util/GeometryUtils.h>
+#include <hoot/core/util/StringUtils.h>
 
 // Qt
 #include <QFileInfo>
+#include <QElapsedTimer>
 
 namespace hoot
 {
@@ -58,6 +60,9 @@ public:
 
   virtual int runSimple(QStringList& args) override
   {
+    QElapsedTimer timer;
+    timer.start();
+
     if (args.size() < 4 || args.size() > 6)
     {
       std::cout << getHelp() << std::endl << std::endl;
@@ -155,6 +160,8 @@ public:
 
     OsmMapWriterFactory::write(map, output);
 
+    LOG_STATUS("Map cropped in " << StringUtils::millisecondsToDhms(timer.elapsed()) << " total.");
+
     return 0;
   }
 
Clone this wiki locally