diff --git a/app/src/main/java/info/nightscout/androidaps/db/CareportalEvent.java b/app/src/main/java/info/nightscout/androidaps/db/CareportalEvent.java index 25c6cdce13..72ff1ddab0 100644 --- a/app/src/main/java/info/nightscout/androidaps/db/CareportalEvent.java +++ b/app/src/main/java/info/nightscout/androidaps/db/CareportalEvent.java @@ -98,13 +98,7 @@ public class CareportalEvent implements DataPointWithLabelInterface { return diff.get(TimeUnit.DAYS) + " " + MainApp.gs(R.string.days) + " " + diff.get(TimeUnit.HOURS) + " " + MainApp.gs(R.string.hours); } - public boolean isOlderThan(double hours) { - Map diff = computeDiff(date, System.currentTimeMillis()); - if(diff.get(TimeUnit.DAYS)*24 + diff.get(TimeUnit.HOURS) > hours) - return true; - else - return false; - } + public boolean isOlderThan(double hours) { return getHoursFromStart() > hours; } public String log() { return "CareportalEvent{" +