Skip to content

Commit

Permalink
Simplify time output at the end of the compilation.
Browse files Browse the repository at this point in the history
This small update is mostly so I can test that the build pipeline is still working ~1.5 years after I stopped working on this project.
  • Loading branch information
Jared T authored Aug 25, 2023
1 parent 1a6218f commit 6a14ac2
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions Source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,7 @@ int main(int argc, char const* argv[])
auto endTime = std::chrono::steady_clock::now();
std::chrono::duration<double> elapsedSeconds = endTime - startTime;
auto ms = (elapsedSeconds * 1000.0).count();
if (ms >= 1.0) {
std::cout << "Took " << static_cast<int>(ms) << "ms" << std::endl;
} else {
// This is very optimistic for a file reading application... probably not needed.
std::cout << "Took " << static_cast<int>(ms*1000.0) << "us" << std::endl;
}
std::cout << "Took " << static_cast<int>(ms) << "ms" << std::endl;

return 0;
}
}

0 comments on commit 6a14ac2

Please sign in to comment.