public Undo_item(String treatment_uuid, String calibration_uuid) { expires = JoH.ts()+EXPIRY_TIME; Calibration_uuid = calibration_uuid; Treatment_uuid = treatment_uuid; } }
public static void testCalibration() { Bundle bundle = new Bundle(); bundle.putDouble("glucose_number", 5.5d+ (JoH.ts() % 100)/100d); // format is local format, in this example 5.5 mmol/l or specify the units as shown below bundle.putString("units", "mmol"); // mgdl or mmol bundle.putLong("timestamp", JoH.tsl()-10000); Intent intent = new Intent(Intents.ACTION_REMOTE_CALIBRATION); intent.putExtras(bundle); intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES); xdrip.getAppContext().sendBroadcast(intent); }
public Undo_item(String treatment_uuid, String calibration_uuid) { expires = JoH.ts()+EXPIRY_TIME; Calibration_uuid = calibration_uuid; Treatment_uuid = treatment_uuid; } }
public static void testCalibration() { Bundle bundle = new Bundle(); bundle.putDouble("glucose_number", 5.5d+ (JoH.ts() % 100)/100d); // format is local format, in this example 5.5 mmol/l or specify the units as shown below bundle.putString("units", "mmol"); // mgdl or mmol bundle.putLong("timestamp", JoH.tsl()-10000); Intent intent = new Intent(Intents.ACTION_REMOTE_CALIBRATION); intent.putExtras(bundle); intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES); xdrip.getAppContext().sendBroadcast(intent); }
@Override public void onClick(DialogInterface dialog, int which) { voiceRecognitionText.setText(input.getText().toString()); voiceRecognitionText.setVisibility(View.VISIBLE); last_speech_time = JoH.ts(); naturalLanguageRecognition(input.getText().toString()); } });
@Override public void onClick(DialogInterface dialog, int which) { voiceRecognitionText.setText(input.getText().toString()); voiceRecognitionText.setVisibility(View.VISIBLE); last_speech_time = JoH.ts(); naturalLanguageRecognition(input.getText().toString()); } });
public static void benchmark_method_end() { String name = backTrace(0); try { double timing = ts() - benchmarks.get(name); Log.i(TAG, "Benchmark: " + name + " " + timing + "ms"); } catch (Exception e) { Log.e(TAG, "Benchmark: " + name + " no benchmark set!"); } }
@Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); Pref.setLong("wifi_warning_never", (long) JoH.ts()); } });
public static void benchmark_method_end() { String name = backTrace(0); try { double timing = ts() - benchmarks.get(name); Log.i(TAG, "Benchmark: " + name + " " + timing + "ms"); } catch (Exception e) { Log.e(TAG, "Benchmark: " + name + " no benchmark set!"); } }
private void sendMessagePayloadTest(Node node, String pathdesc, String path, byte[] payload) { double benchmark_time = 0; //JoH.benchmark(null); benchmark_time = ts(); for (int i = 0; i < 50; i++) { sendMessageTest(node, pathdesc + " " + i + " ", path, payload); } //JoH.benchmark(pathdesc + " Send 50x len=" + payload.length*50); Log.i(TAG, "Benchmark: " + pathdesc + " Send 50x len=" + payload.length * 50 + " " + (ts() - benchmark_time) + " ms"); }
@Override public void onClick(DialogInterface dialog, int which) { LanguageStore.putString(CONSENT_KEY, "Agreed:" + JoH.ts()); saveData(); } });
@Override public void onClick(DialogInterface dialog, int which) { LanguageStore.putString(CONSENT_KEY, "Agreed:" + JoH.ts()); saveData(); } });
@Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); Pref.setLong("wifi_warning_never", (long) JoH.ts()); } });
public static void benchmark_method_end() { String name = backTrace(0); try { double timing = ts() - benchmarks.get(name); Log.i(TAG, "Benchmark: " + name + " " + timing + "ms"); } catch (Exception e) { Log.e(TAG, "Benchmark: " + name + " no benchmark set!"); } }
private void setConnectionStatusFollower() { if (GcmListenerSvc.lastMessageReceived == 0) { connection_status.setText(getApplicationContext().getString(R.string.no_data)); } else { connection_status.setText((JoH.qs((JoH.ts() - GcmListenerSvc.lastMessageReceived) / 60000, 0)) + " mins ago"); } } private void setConnectionStatusWifiWixel() {
private void setConnectionStatusFollower() { if (GcmListenerSvc.lastMessageReceived == 0) { connection_status.setText(getApplicationContext().getString(R.string.no_data)); } else { connection_status.setText((JoH.qs((JoH.ts() - GcmListenerSvc.lastMessageReceived) / 60000, 0)) + " mins ago"); } } private void setConnectionStatusWifiWixel() {
private void setConnectionStatusFollower() { if (GcmListenerSvc.lastMessageReceived == 0) { connection_status.setText(safeGetContext().getString(R.string.no_data)); } else { connection_status.setText((JoH.qs((JoH.ts() - GcmListenerSvc.lastMessageReceived) / 60000, 0)) + " mins ago"); } }
private void setConnectionStatusFollower() { if (GcmListenerSvc.lastMessageReceived == 0) { connection_status.setText(safeGetContext().getString(R.string.no_data)); } else { connection_status.setText((JoH.qs((JoH.ts() - GcmListenerSvc.lastMessageReceived) / 60000, 0)) + " mins ago"); } }
public void sendDownload() { if (PebbleKit.isWatchConnected(this.context)) { PebbleDictionary dictionary = buildDictionary(); if (dictionary != null && this.context != null) { Log.d(TAG, "sendDownload: Sending data to pebble"); sendDataToPebble(dictionary); last_time_seen = JoH.ts(); } } else { watchdog(); } }