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})
endif ()
set (Boost_USE_MULTITHREADED 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
REQUIRED COMPONENTS ${Boost_LIBS})
if(UNIX AND NOT APPLE)
......
......@@ -55,7 +55,6 @@
#include "Optimizer/EA/Population.h"
#include "Optimizer/EA/Variator.h"
#include <boost/chrono.hpp>
#include <boost/property_tree/ptree.hpp>
#include "Util/Trace/Trace.h"
......@@ -242,8 +241,8 @@ private:
/// file header for result files contains this parameter description
std::string file_param_descr_;
boost::chrono::system_clock::time_point run_clock_start_;
boost::chrono::system_clock::time_point last_clock_;
std::chrono::system_clock::time_point run_clock_start_;
std::chrono::system_clock::time_point last_clock_;
// DEBUG output helpers
std::unique_ptr<Trace> job_trace_;
......
......@@ -182,8 +182,8 @@ void FixedPisaNsga2<CO, MO>::initialize() {
initialized_m = false;
// start poll loop
run_clock_start_ = boost::chrono::system_clock::now();
last_clock_ = boost::chrono::system_clock::now();
run_clock_start_ = std::chrono::system_clock::now();
last_clock_ = std::chrono::system_clock::now();
run();
// run has ended
......@@ -192,8 +192,8 @@ void FixedPisaNsga2<CO, MO>::initialize() {
current_hvol_ =
variator_m->population()->computeHypervolume(comms_.island_id, hvol_ref_m);
boost::chrono::duration<double> total =
boost::chrono::system_clock::now() - run_clock_start_;
std::chrono::duration<double> total =
std::chrono::system_clock::now() - run_clock_start_;
std::ostringstream stats;
stats << "__________________________________________" << std::endl;
stats << "GENERATION " << act_gen << std::endl;
......@@ -363,11 +363,11 @@ void FixedPisaNsga2<CO, MO>::postPoll() {
current_hvol_ = hvol;
}
boost::chrono::duration<double> total =
boost::chrono::system_clock::now() - run_clock_start_;
boost::chrono::duration<double> dt =
boost::chrono::system_clock::now() - last_clock_;
last_clock_ = boost::chrono::system_clock::now();
std::chrono::duration<double> total =
std::chrono::system_clock::now() - run_clock_start_;
std::chrono::duration<double> dt =
std::chrono::system_clock::now() - last_clock_;
last_clock_ = std::chrono::system_clock::now();
std::ostringstream stats;
stats << "__________________________________________" << std::endl;
stats << "Arriving at generation " << act_gen + 1 << std::endl;
......
......@@ -22,7 +22,6 @@
#define __TIMESTAMP_H__
#include <sstream>
#include <boost/chrono.hpp>
#include <ctime>
#include "Util/Trace/TraceComponent.h"
......@@ -40,9 +39,9 @@ public:
void execute(std::ostringstream &dump) {
boost::chrono::time_point<boost::chrono::system_clock> now;
now = boost::chrono::system_clock::now();
std::time_t now_time = boost::chrono::system_clock::to_time_t(now);
std::chrono::time_point<std::chrono::system_clock> now;
now = std::chrono::system_clock::now();
std::time_t now_time = std::chrono::system_clock::to_time_t(now);
std::ostringstream timestamp;
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