From db17d990d994300016c7e88cecad7de81f5e79e5 Mon Sep 17 00:00:00 2001 From: Bruno Martins Date: Wed, 16 Nov 2016 23:40:24 +0000 Subject: z2_plus: Update GPS stack * Tag LA.UM.5.5.r1-00100-8x96.0 Change-Id: I18cd979799001ccbaae6d08d07f907689ac5a00a --- 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