Promotion of location.lnx.1.0-00026.
CRs Change ID Subject -------------------------------------------------------------------------------------------------------------- 991345 Ieaad5dfa80b26b90e998618b3cbe1e590fc00839 gps: consider nsec while ranking the timer objects Change-Id: I3af70f12f1cd2c1cad71b889c82d64c6c51ae65a CRs-Fixed: 991345
This commit is contained in:
commit
0493bacf4e
1 changed files with 6 additions and 1 deletions
|
@ -505,8 +505,13 @@ int LocTimerDelegate::ranks(LocRankable& rankable) {
|
||||||
LocTimerDelegate* timer = (LocTimerDelegate*)(&rankable);
|
LocTimerDelegate* timer = (LocTimerDelegate*)(&rankable);
|
||||||
if (timer) {
|
if (timer) {
|
||||||
// larger time ranks lower!!!
|
// 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;
|
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;
|
return rank;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue