From 39b4eac60f0d7313bb42a99192d5edcf8c418fcf Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Wed, 15 Jul 2020 22:46:59 +0200 Subject: [PATCH] add delay to executing automations --- .../androidaps/plugins/general/automation/AutomationPlugin.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/automation/AutomationPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/automation/AutomationPlugin.kt index b67d270c8d..dff373058e 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/automation/AutomationPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/automation/AutomationPlugin.kt @@ -5,6 +5,7 @@ import android.content.Intent import android.os.Build import android.os.Handler import android.os.HandlerThread +import android.os.SystemClock import dagger.android.HasAndroidInjector import info.nightscout.androidaps.R import info.nightscout.androidaps.events.EventBTChange @@ -211,6 +212,7 @@ class AutomationPlugin @Inject constructor( } }) } + SystemClock.sleep(1100) event.lastRun = DateUtil.now() } }