snooze carb alerts for 15 min after treatments
This commit is contained in:
parent
28f2630a91
commit
8aabf15dfe
|
@ -337,6 +337,14 @@ public class LoopPlugin extends PluginBase implements LoopInterface {
|
|||
}
|
||||
return isDisconnected;
|
||||
}
|
||||
public boolean treatmentTimethreshold(int duartionMinutes) {
|
||||
long threshold = System.currentTimeMillis() + (duartionMinutes*60*1000);
|
||||
boolean bool = false;
|
||||
if (treatmentsPlugin.getLastBolusTime() > threshold || treatmentsPlugin.getLastCarbTime() > threshold)
|
||||
bool = true;
|
||||
|
||||
return bool;
|
||||
}
|
||||
|
||||
public synchronized void invoke(String initiator, boolean allowNotification) {
|
||||
invoke(initiator, allowNotification, false);
|
||||
|
|
Loading…
Reference in a new issue