public void run() {
Service s = getService();
if(s!=null) {
try {
CalculablePatient c = checkAdd(s, "pulse", lastPulse);
if(c!=null) {
lastPulse = c;
pulseTimeSeries.addOrUpdate(new FixedMillisecond(c.getWhen()), c.getValue());
}
} catch (IOException e) {
e.printStackTrace();
}
try {
Calculable c = checkAdd(s, "temperature", lastTemperature);
if(c!=null) {
lastTemperature = c;
temperatureTimeSeries.addOrUpdate(new FixedMillisecond(c.getWhen()), c.getValue());
}
} catch (RemoteException e) {
e.printStackTrace();
}
}