From 69461e5c94c21976f071d88402f67fa3add1d9f1 Mon Sep 17 00:00:00 2001 From: Matteo Cypriani Date: Fri, 8 Jun 2012 12:43:07 +0200 Subject: [PATCH] [Positioner] Input: update current time (replay) In replay mode, update the current time when getting a new request. --- owlps-positioner/src/input.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/owlps-positioner/src/input.cc b/owlps-positioner/src/input.cc index 0cbf78f..b7967af 100644 --- a/owlps-positioner/src/input.cc +++ b/owlps-positioner/src/input.cc @@ -124,6 +124,14 @@ const Request& Input::get_next_request() const const Request& request = medium->get_next_request() ; 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" ; + } + // If the request is a calibration request, add it to the Stock // (if allowed, and if it is not empty) if (Configuration::bool_value(