From dfdb7857f673056995af4660b5a8624623341221 Mon Sep 17 00:00:00 2001 From: jbr7rr Date: Tue, 27 Dec 2022 16:48:53 +0100 Subject: [PATCH] No delay at all for initial timestamp --- .../iob/iobCobCalculator/data/AutosensDataStoreObject.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/plugins/main/src/main/java/info/nightscout/plugins/iob/iobCobCalculator/data/AutosensDataStoreObject.kt b/plugins/main/src/main/java/info/nightscout/plugins/iob/iobCobCalculator/data/AutosensDataStoreObject.kt index 60e2e0dc86..8f2ccb99ab 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/iob/iobCobCalculator/data/AutosensDataStoreObject.kt +++ b/plugins/main/src/main/java/info/nightscout/plugins/iob/iobCobCalculator/data/AutosensDataStoreObject.kt @@ -222,9 +222,7 @@ class AutosensDataStoreObject : AutosensDataStore { return } val newBucketedData = ArrayList() - - // Round time to 1 minute, This sets timestamp a bit in the past, but not much longer that it is noticable - var currentTime = bgReadings[0].timestamp - bgReadings[0].timestamp % T.mins(1).msecs() + var currentTime = bgReadings[0].timestamp val adjustedTime = adjustToReferenceTime(currentTime) // after adjusting time may be newer. In this case use T-5min currentTime = if (adjustedTime > currentTime) adjustedTime - T.mins(5).msecs() else adjustedTime