diff options
author | Veronica Veremjova <VVeremjova@luxoft.com> | 2016-04-12 16:04:30 +0300 |
---|---|---|
committer | Veronica Veremjova <VVeremjova@luxoft.com> | 2016-04-12 16:13:46 +0300 |
commit | b93abddf8b02a5156598039aeab3964960355c62 (patch) | |
tree | 0c3a2e7476586c58ee03fa78551ca90bf9af9e95 | |
parent | 16a9a6afd2239ebfbfe77d300c296d0fdf87b416 (diff) | |
download | sdl_core-b93abddf8b02a5156598039aeab3964960355c62.tar.gz |
Add buffer for sending request
Should wait response from HMI. Buffer is needed
because several milliseconds are spend on moving
request from SDL to HMI
Relates APPLINK-17756
-rw-r--r-- | src/components/application_manager/src/request_controller.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/components/application_manager/src/request_controller.cc b/src/components/application_manager/src/request_controller.cc index da05f43858..cd23248b7c 100644 --- a/src/components/application_manager/src/request_controller.cc +++ b/src/components/application_manager/src/request_controller.cc @@ -475,9 +475,12 @@ void RequestController::Worker::exitThreadMain() { void RequestController::UpdateTimer() { LOG4CXX_AUTO_TRACE(logger_); RequestInfoPtr front = waiting_for_response_.FrontWithNotNullTimeout(); + // Buffer for sending request + const uint32_t delay_time = 100u; if (front) { const TimevalStruct current_time = date_time::DateTime::getCurrentTime(); - const TimevalStruct end_time = front->end_time(); + TimevalStruct end_time = front->end_time(); + date_time::DateTime::AddMilliseconds(end_time, delay_time); if (current_time < end_time) { const uint32_t msecs =static_cast<uint32_t>(date_time::DateTime::getmSecs(end_time - current_time) ); LOG4CXX_DEBUG(logger_, "Sleep for " << msecs << " millisecs" ); |