Skip to content

Commit

Permalink
Adding total time.
Browse files Browse the repository at this point in the history
  • Loading branch information
takeninenv committed Nov 8, 2024
1 parent b1585d6 commit 7bfe7ee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cpp/tool/FLIPToolHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,8 @@ namespace FLIPTool

int execute(commandline commandLine)
{
auto timeStart = std::chrono::high_resolution_clock::now();

std::string FLIPString = "FLIP";
int MajorVersion = 1;
int MinorVersion = 4;
Expand Down Expand Up @@ -606,6 +608,8 @@ namespace FLIPTool
pooledValues.saveOverlappedHistogram(firstPooledValues, destinationDirectory + "/" + histogramFileName.toString(), referenceImage.getWidth(), referenceImage.getHeight(), optionLog, referenceFileName.getName(), firstTestFileName.getName(), testFileName.getName(), !optionExcludeValues, yMax);
}

float timeTotal = std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::high_resolution_clock::now() - timeStart).count() / 1000000.0f;
std::cout << "\nTotal time: " << FIXED_DECIMAL_DIGITS(timeTotal, 4) << " seconds\n";
exit(EXIT_SUCCESS); // From stdlib.h: equal to 0.
}
}

0 comments on commit 7bfe7ee

Please sign in to comment.