Skip to content

Commit b59ef64

Browse files
committed
use unix time instead of time since boot
1 parent 33e407f commit b59ef64

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

core/src/main/java/io/snabble/sdk/ShoppingCart.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import android.os.Handler;
44
import android.os.Looper;
5-
import android.os.SystemClock;
65

76
import org.apache.commons.lang3.StringUtils;
87

@@ -275,7 +274,7 @@ public void invalidate() {
275274
}
276275

277276
public void checkForTimeout() {
278-
long currentTime = SystemClock.elapsedRealtime();
277+
long currentTime = System.currentTimeMillis();
279278

280279
if(lastModificationTime + TIMEOUT < currentTime){
281280
invalidate();
@@ -458,7 +457,7 @@ public int getTotalQuantity() {
458457
}
459458

460459
private void updateTimestamp() {
461-
lastModificationTime = SystemClock.elapsedRealtime();
460+
lastModificationTime = System.currentTimeMillis();
462461
}
463462

464463
/**

0 commit comments

Comments
 (0)