while (isRunning()) {
// run loop to fetch StatusVariables values and fire events
if (count == 0 || ++measurementsTaken < count) {
try {
for (String path : statusVariablePaths) {
StatusVariablePath statusVariablePath = new StatusVariablePath(path);
StatusVariable statusVariable = visitor.getStatusVariable(statusVariablePath.getPath());
visitor.fireEvent(statusVariablePath.getMonitorableId(), statusVariable, getInitiator());
}
try {
TimeUnit.SECONDS.sleep(schedule);
} catch (InterruptedException e) {
return;