diff --git a/owlps-positioner/src/input.cc b/owlps-positioner/src/input.cc index b7967af..dc0e486 100644 --- a/owlps-positioner/src/input.cc +++ b/owlps-positioner/src/input.cc @@ -125,12 +125,7 @@ const Request& Input::get_next_request() const log_current_request() ; if (Configuration::is_configured("replay")) - { - Timestamp::update_current_time(request.get_time_sent()) ; - if (Configuration::is_configured("verbose")) - cerr << "Current time set to " - << Timestamp::get_current_time() << ".\n" ; - } + Timestamp::update_current_time(request.get_time_sent()) ; // If the request is a calibration request, add it to the Stock // (if allowed, and if it is not empty) diff --git a/owlps-positioner/src/timestamp.cc b/owlps-positioner/src/timestamp.cc index 73bf1c0..61b968f 100644 --- a/owlps-positioner/src/timestamp.cc +++ b/owlps-positioner/src/timestamp.cc @@ -9,7 +9,9 @@ #include "configuration.hh" #include +#include +using namespace std ; Timestamp Timestamp::current_time ; @@ -110,7 +112,14 @@ void Timestamp::update_current_time(const Timestamp &source) // According to human perception, time generally goes only forward: if (current_time < source) - current_time = source ; + { + current_time = source ; + if (Configuration::is_configured("verbose")) + cerr << "Current time set to " << current_time << ".\n" ; + } + else if (Configuration::is_configured("verbose")) + cerr << "Current time left unchanged to " << current_time + << " (time proposed: " << source << ").\n" ; }