[Positioner] Verbose Timestamp::update_current_time()
This commit is contained in:
parent
451e665eda
commit
4e3843a502
|
@ -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)
|
||||
|
|
|
@ -9,7 +9,9 @@
|
|||
#include "configuration.hh"
|
||||
|
||||
#include <boost/functional/hash.hpp>
|
||||
#include <iostream>
|
||||
|
||||
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" ;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue