From bbe18df63ffec169f45a5275db01c42c6f0b1e74 Mon Sep 17 00:00:00 2001 From: Brendan Whitfield Date: Thu, 17 Mar 2016 21:29:28 -0400 Subject: [PATCH] print correct running times previously, ofGetElapsedTimef() was being used twice, with the two values being subtracted. This is incorrect, since the call to of::priv::initutils() will zero the internal time counter for us. --- commandLine/src/main.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/commandLine/src/main.cpp b/commandLine/src/main.cpp index b735eda7..1d38f094 100644 --- a/commandLine/src/main.cpp +++ b/commandLine/src/main.cpp @@ -52,7 +52,6 @@ enum pgMode { }; -float startTime; int nProjectsUpdated; int nProjectsCreated; @@ -352,7 +351,6 @@ int main(int argc, char* argv[]){ bHelpRequested = false; bListTemplates = false; targets.push_back(ofGetTargetPlatform()); - startTime = 0; nProjectsUpdated = 0; nProjectsCreated = 0; string projectName = ""; @@ -433,7 +431,6 @@ int main(int argc, char* argv[]){ // ------------------------------------------------------ post parse - startTime = ofGetElapsedTimef(); nProjectsUpdated = 0; nProjectsCreated = 0; of::priv::initutils(); @@ -627,11 +624,10 @@ int main(int argc, char* argv[]){ } consoleSpace(); - float elapsedTime = ofGetElapsedTimef() - startTime; if (nProjectsCreated > 0) cout << nProjectsCreated << " project created "; if (nProjectsUpdated == 1)cout << nProjectsUpdated << " project updated "; if (nProjectsUpdated > 1) cout << nProjectsUpdated << " projects updated "; - ofLogNotice() << "in " << elapsedTime << " seconds" << endl; + ofLogNotice() << "in " << ofGetElapsedTimef() << " seconds" << endl; consoleSpace();