Skip to content

Commit

Permalink
fix global_timestamp_reader to make first time request from device so…
Browse files Browse the repository at this point in the history
…oner. Reduces number of frame requests receiving Hardware timestamp instead of global timestamp.
  • Loading branch information
doronhi committed May 2, 2020
1 parent 715bc9e commit 3ca4cfa
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/global_timestamp_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,9 @@ namespace librealsense

void time_diff_keeper::polling(dispatcher::cancellable_timer cancellable_timer)
{
update_diff_time();
unsigned int time_to_sleep = _poll_intervals_ms + _coefs.is_full() * (9 * _poll_intervals_ms);
if (cancellable_timer.try_sleep(time_to_sleep))
{
update_diff_time();
}
else
if (!cancellable_timer.try_sleep(time_to_sleep))
{
LOG_DEBUG("Notification: time_diff_keeper polling loop is being shut-down");
}
Expand Down

0 comments on commit 3ca4cfa

Please sign in to comment.