From f7102b858dc849cc94255bc96f95b880dfd93452 Mon Sep 17 00:00:00 2001 From: Fedor917 Date: Thu, 10 Nov 2016 15:53:00 +0700 Subject: Initialising brunch based on davidevinavil device tree (CM14.0 branch) --- gps/utils/LocTimer.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'gps/utils/LocTimer.cpp') diff --git a/gps/utils/LocTimer.cpp b/gps/utils/LocTimer.cpp index 70904b2..4de6b40 100644 --- a/gps/utils/LocTimer.cpp +++ b/gps/utils/LocTimer.cpp @@ -505,8 +505,13 @@ int LocTimerDelegate::ranks(LocRankable& rankable) { LocTimerDelegate* timer = (LocTimerDelegate*)(&rankable); if (timer) { // larger time ranks lower!!! - // IOW, if input obj has bigger tv_sec, this obj outRanks higher + // IOW, if input obj has bigger tv_sec/tv_nsec, this obj outRanks higher rank = timer->mFutureTime.tv_sec - mFutureTime.tv_sec; + if(0 == rank) + { + //rank against tv_nsec for msec accuracy + rank = (int)(timer->mFutureTime.tv_nsec - mFutureTime.tv_nsec); + } } return rank; } -- cgit v1.2.3