public static Treatments byTimestamp(long timestamp) { return byTimestamp(timestamp, 1500); }
public static Treatments byTimestamp(long timestamp) { return byTimestamp(timestamp, 1500); }
public static Treatments byTimestamp(long timestamp) { return byTimestamp(timestamp, 1500); }
if (Treatments.byTimestamp(timestamp, (int) (2.5 * MINUTE_IN_MS)) != null) { dialogBuilder.setNeutralButton("Delete", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) {
if (Treatments.byTimestamp(timestamp, (int) (2.5 * MINUTE_IN_MS)) != null) { dialogBuilder.setNeutralButton("Delete", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) {
public static void delete_by_timestamp(long timestamp, int accuracy, boolean from_interactive) { final Treatments t = byTimestamp(timestamp, accuracy); // do we need to alter default accuracy? if (t != null) { Log.d(TAG, "Deleting treatment closest to: " + JoH.dateTimeText(timestamp) + " matches uuid: " + t.uuid); delete_by_uuid(t.uuid, from_interactive); } else { Log.e(TAG, "Couldn't find a treatment near enough to " + JoH.dateTimeText(timestamp) + " to delete!"); } }
public static void delete_by_timestamp(long timestamp, int accuracy, boolean from_interactive) { final Treatments t = byTimestamp(timestamp, accuracy); // do we need to alter default accuracy? if (t != null) { Log.d(TAG, "Deleting treatment closest to: " + JoH.dateTimeText(timestamp) + " matches uuid: " + t.uuid); delete_by_uuid(t.uuid, from_interactive); } else { Log.e(TAG, "Couldn't find a treatment near enough to " + JoH.dateTimeText(timestamp) + " to delete!"); } }
Treatments Treatment = byTimestamp(timestamp, 60 * 1000 * 5);
public static void delete_by_timestamp(long timestamp, int accuracy, boolean from_interactive) { final Treatments t = byTimestamp(timestamp, accuracy); // do we need to alter default accuracy? if (t != null) { Log.d(TAG, "Deleting treatment closest to: " + JoH.dateTimeText(timestamp) + " matches uuid: " + t.uuid); delete_by_uuid(t.uuid, from_interactive); } else { Log.e(TAG, "Couldn't find a treatment near enough to " + JoH.dateTimeText(timestamp) + " to delete!"); } }
Treatments dupe_treatment = byTimestamp(mytreatment.timestamp); if (dupe_treatment != null) { Log.i(TAG, "Duplicate treatment for: " + mytreatment.timestamp);
Treatments treatment = byTimestamp(timestamp, 60 * 1000 * 5);
Treatments treatment = byTimestamp(timestamp, 60 * 1000 * 5);
final Treatments dupe_treatment = byTimestamp(mytreatment.timestamp); if (dupe_treatment != null) { Log.i(TAG, "Duplicate treatment for: " + mytreatment.timestamp);
if ((existing == null) && (!from_xdrip)) { existing = Treatments.byTimestamp(timestamp, 60000); if (!((existing != null) && (JoH.roundDouble(existing.insulin, 2) == JoH.roundDouble(insulin, 2)) && (JoH.roundDouble(existing.carbs, 2) == JoH.roundDouble(carbs, 2))
final Treatments dupe_treatment = byTimestamp(mytreatment.timestamp); if (dupe_treatment != null) { Log.i(TAG, "Duplicate treatment for: " + mytreatment.timestamp);
if ((existing == null) && (!from_xdrip)) { existing = Treatments.byTimestamp(timestamp, 60000); if (!((existing != null) && (JoH.roundDouble(existing.insulin, 2) == JoH.roundDouble(insulin, 2)) && (JoH.roundDouble(existing.carbs, 2) == JoH.roundDouble(carbs, 2))
final Treatments existing = Treatments.byTimestamp(record.timestamp, 120000);
final Treatments existing = Treatments.byTimestamp(record.timestamp, 120000);
long time = Treatments.getTimeStampWithOffset(mytimeoffset); final Treatments exists = Treatments.byTimestamp(time); if (exists == null) { Log.d(TAG, "processAndApproveTreatment create watchkeypad Treatment carbs=" + thiscarbsnumber + " insulin=" + thisinsulinnumber + " timestamp=" + JoH.dateTimeText(time) + " uuid=" + thisuuid);
long time = Treatments.getTimeStampWithOffset(mytimeoffset); final Treatments exists = Treatments.byTimestamp(time); if (exists == null) { Log.d(TAG, "processAndApproveTreatment create watchkeypad Treatment carbs=" + thiscarbsnumber + " insulin=" + thisinsulinnumber + " timestamp=" + JoH.dateTimeText(time) + " uuid=" + thisuuid);