Skip to content

Commit

Permalink
build: Improve build times by removing std::chrono from headers
Browse files Browse the repository at this point in the history
  • Loading branch information
jumanji144 committed Dec 2, 2023
1 parent f948b02 commit 418934f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/include/pl/pattern_language.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ namespace pl {
* @brief Gets the time the last execution took
* @return Time the last execution took
*/
[[nodiscard]] const std::chrono::duration<double> & getLastRunningTime() const {
[[nodiscard]] double getLastRunningTime() const {
return this->m_runningTime;
}

Expand Down Expand Up @@ -369,7 +369,7 @@ namespace pl {

std::optional<u64> m_startAddress;
std::endian m_defaultEndian = std::endian::little;
std::chrono::duration<double> m_runningTime = std::chrono::duration<double>::zero();
double m_runningTime = 0;
};

}
2 changes: 1 addition & 1 deletion lib/source/pl/pattern_language.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ namespace pl {
const auto startTime = std::chrono::high_resolution_clock::now();
ON_SCOPE_EXIT {
const auto endTime = std::chrono::high_resolution_clock::now();
this->m_runningTime = std::chrono::duration_cast<std::chrono::duration<double>>(endTime - startTime);
this->m_runningTime = std::chrono::duration_cast<std::chrono::duration<double>>(endTime - startTime).count();
};

code = wolv::util::replaceStrings(code, "\r\n", "\n");
Expand Down

0 comments on commit 418934f

Please sign in to comment.