aboutsummaryrefslogtreecommitdiff
path: root/gps/utils/LocTimer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gps/utils/LocTimer.cpp')
-rw-r--r--gps/utils/LocTimer.cpp7
1 files changed, 6 insertions, 1 deletions
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;
}