This commit is contained in:
Sandor Dornbush
2010-08-24 12:20:18 -07:00
parent 06636b2a28
commit 4be4467fc6
@@ -347,6 +347,8 @@ public class TripStatisticsBuilder {
* Returns the amount of time the user has been idle or 0 if they are moving.
*/
public long getIdleTime() {
if (lastLocation == null || lastMovingLocation == null)
return 0;
return lastLocation.getTime() - lastMovingLocation.getTime();
}