Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects
Commit 10792bb2 authored by gsell's avatar gsell
Browse files

Merge branch '799-replace-boost-chrono-with-std-chrono' into 'master'

Resolve "replace boost::chrono with std::chrono"

Closes #799

See merge request !657
parents 12e46078 01f54b1e
No related branches found
No related tags found
1 merge request!657Resolve "replace boost::chrono with std::chrono"
...@@ -177,7 +177,7 @@ if (NOT ${WILL_BUILD_SHARED_LIBRARY}) ...@@ -177,7 +177,7 @@ if (NOT ${WILL_BUILD_SHARED_LIBRARY})
endif () endif ()
set (Boost_USE_MULTITHREADED OFF) set (Boost_USE_MULTITHREADED OFF)
set (Boost_USE_STATIC_RUNTIME OFF) set (Boost_USE_STATIC_RUNTIME OFF)
set (Boost_LIBS chrono filesystem iostreams regex serialization system timer) set (Boost_LIBS filesystem iostreams regex serialization system timer)
find_package (Boost 1.66.0 find_package (Boost 1.66.0
REQUIRED COMPONENTS ${Boost_LIBS}) REQUIRED COMPONENTS ${Boost_LIBS})
if(UNIX AND NOT APPLE) if(UNIX AND NOT APPLE)
......
...@@ -55,7 +55,6 @@ ...@@ -55,7 +55,6 @@
#include "Optimizer/EA/Population.h" #include "Optimizer/EA/Population.h"
#include "Optimizer/EA/Variator.h" #include "Optimizer/EA/Variator.h"
#include <boost/chrono.hpp>
#include <boost/property_tree/ptree.hpp> #include <boost/property_tree/ptree.hpp>
#include "Util/Trace/Trace.h" #include "Util/Trace/Trace.h"
...@@ -242,8 +241,8 @@ private: ...@@ -242,8 +241,8 @@ private:
/// file header for result files contains this parameter description /// file header for result files contains this parameter description
std::string file_param_descr_; std::string file_param_descr_;
boost::chrono::system_clock::time_point run_clock_start_; std::chrono::system_clock::time_point run_clock_start_;
boost::chrono::system_clock::time_point last_clock_; std::chrono::system_clock::time_point last_clock_;
// DEBUG output helpers // DEBUG output helpers
std::unique_ptr<Trace> job_trace_; std::unique_ptr<Trace> job_trace_;
......
...@@ -182,8 +182,8 @@ void FixedPisaNsga2<CO, MO>::initialize() { ...@@ -182,8 +182,8 @@ void FixedPisaNsga2<CO, MO>::initialize() {
initialized_m = false; initialized_m = false;
// start poll loop // start poll loop
run_clock_start_ = boost::chrono::system_clock::now(); run_clock_start_ = std::chrono::system_clock::now();
last_clock_ = boost::chrono::system_clock::now(); last_clock_ = std::chrono::system_clock::now();
run(); run();
// run has ended // run has ended
...@@ -192,8 +192,8 @@ void FixedPisaNsga2<CO, MO>::initialize() { ...@@ -192,8 +192,8 @@ void FixedPisaNsga2<CO, MO>::initialize() {
current_hvol_ = current_hvol_ =
variator_m->population()->computeHypervolume(comms_.island_id, hvol_ref_m); variator_m->population()->computeHypervolume(comms_.island_id, hvol_ref_m);
boost::chrono::duration<double> total = std::chrono::duration<double> total =
boost::chrono::system_clock::now() - run_clock_start_; std::chrono::system_clock::now() - run_clock_start_;
std::ostringstream stats; std::ostringstream stats;
stats << "__________________________________________" << std::endl; stats << "__________________________________________" << std::endl;
stats << "GENERATION " << act_gen << std::endl; stats << "GENERATION " << act_gen << std::endl;
...@@ -363,11 +363,11 @@ void FixedPisaNsga2<CO, MO>::postPoll() { ...@@ -363,11 +363,11 @@ void FixedPisaNsga2<CO, MO>::postPoll() {
current_hvol_ = hvol; current_hvol_ = hvol;
} }
boost::chrono::duration<double> total = std::chrono::duration<double> total =
boost::chrono::system_clock::now() - run_clock_start_; std::chrono::system_clock::now() - run_clock_start_;
boost::chrono::duration<double> dt = std::chrono::duration<double> dt =
boost::chrono::system_clock::now() - last_clock_; std::chrono::system_clock::now() - last_clock_;
last_clock_ = boost::chrono::system_clock::now(); last_clock_ = std::chrono::system_clock::now();
std::ostringstream stats; std::ostringstream stats;
stats << "__________________________________________" << std::endl; stats << "__________________________________________" << std::endl;
stats << "Arriving at generation " << act_gen + 1 << std::endl; stats << "Arriving at generation " << act_gen + 1 << std::endl;
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#define __TIMESTAMP_H__ #define __TIMESTAMP_H__
#include <sstream> #include <sstream>
#include <boost/chrono.hpp>
#include <ctime> #include <ctime>
#include "Util/Trace/TraceComponent.h" #include "Util/Trace/TraceComponent.h"
...@@ -40,9 +39,9 @@ public: ...@@ -40,9 +39,9 @@ public:
void execute(std::ostringstream &dump) { void execute(std::ostringstream &dump) {
boost::chrono::time_point<boost::chrono::system_clock> now; std::chrono::time_point<std::chrono::system_clock> now;
now = boost::chrono::system_clock::now(); now = std::chrono::system_clock::now();
std::time_t now_time = boost::chrono::system_clock::to_time_t(now); std::time_t now_time = std::chrono::system_clock::to_time_t(now);
std::ostringstream timestamp; std::ostringstream timestamp;
timestamp << std::ctime(&now_time); timestamp << std::ctime(&now_time);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment