-
Notifications
You must be signed in to change notification settings - Fork 75
v0.2.54..v0.2.55 changeset StatCmd.cpp
Garret Voltz edited this page Aug 14, 2020
·
1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/cmd/StatCmd.cpp b/hoot-core/src/main/cpp/hoot/core/cmd/StatCmd.cpp
index ced7ded..542e800 100644
--- a/hoot-core/src/main/cpp/hoot/core/cmd/StatCmd.cpp
+++ b/hoot-core/src/main/cpp/hoot/core/cmd/StatCmd.cpp
@@ -22,7 +22,7 @@
* This will properly maintain the copyright information. DigitalGlobe
* copyrights will be updated automatically.
*
- * @copyright Copyright (C) 2018, 2019 DigitalGlobe (http://www.digitalglobe.com/)
+ * @copyright Copyright (C) 2018, 2019, 2020 DigitalGlobe (http://www.digitalglobe.com/)
*/
// Hoot
@@ -41,6 +41,9 @@
#include <hoot/core/io/ElementVisitorInputStream.h>
#include <hoot/core/util/StringUtils.h>
+// Qt
+#include <QElapsedTimer>
+
namespace hoot
{
@@ -62,6 +65,9 @@ public:
virtual int runSimple(QStringList& args) override
{
+ QElapsedTimer timer;
+ timer.start();
+
if (args.size() < 2 || args.size() > 3)
{
LOG_VAR(args);
@@ -96,6 +102,9 @@ public:
std::cout << std::endl << "Calculated statistic: " <<
QString::number(stat, 'g', 3) << std::endl;
+ LOG_STATUS(
+ "Statistic calculated in " << StringUtils::millisecondsToDhms(timer.elapsed()) << " total.");
+
return 0;
}