From d54651e916fa457fb9a30204b9dc02c9ae9efc30 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Sun, 28 Oct 2018 12:21:35 +0100 Subject: [PATCH] cache midnight time calculation --- .../nightscout/androidaps/data/Profile.java | 30 +++++-------- .../IobCobCalculator/IobCobOref1Thread.java | 5 ++- .../IobCobCalculator/IobCobThread.java | 5 ++- .../info/nightscout/utils/MidnightTime.java | 43 +++++++++++++++++++ 4 files changed, 61 insertions(+), 22 deletions(-) create mode 100644 app/src/main/java/info/nightscout/utils/MidnightTime.java diff --git a/app/src/main/java/info/nightscout/androidaps/data/Profile.java b/app/src/main/java/info/nightscout/androidaps/data/Profile.java index 8d78ca19b66..0595c2f84df 100644 --- a/app/src/main/java/info/nightscout/androidaps/data/Profile.java +++ b/app/src/main/java/info/nightscout/androidaps/data/Profile.java @@ -23,6 +23,7 @@ import info.nightscout.utils.DateUtil; import info.nightscout.utils.DecimalFormatter; import info.nightscout.utils.FabricPrivacy; +import info.nightscout.utils.MidnightTime; public class Profile { private static Logger log = LoggerFactory.getLogger(Profile.class); @@ -381,7 +382,7 @@ private String getValuesList(LongSparseArray array, LongSparseArray