Skip to content

Commit 190aec2

Browse files
authored
Remove std::chrono namespace using directive (#453)
- remove `using namespace std::chrono` from task header - explicitly qualify chrono functions
1 parent 39dbc6c commit 190aec2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/core/task/include/task.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
#include <stdexcept>
1616
#include <string>
1717

18-
using namespace std::chrono;
19-
2018
namespace ppc::core {
2119

2220
/// @brief Represents the type of task (parallelization technology).
@@ -201,7 +199,9 @@ class Task {
201199
}
202200

203201
if (str == "PostProcessing") {
204-
auto duration = duration_cast<nanoseconds>(high_resolution_clock::now() - tmp_time_point_).count();
202+
auto duration = std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::high_resolution_clock::now() -
203+
tmp_time_point_)
204+
.count();
205205
auto diff = static_cast<double>(duration) * 1e-9;
206206

207207
std::stringstream err_msg;

0 commit comments

Comments
 (0)