Signed-off-by: Mika Laitio <lamikr@pilppa.org>
list<Device *>::iterator list_iter;
Device *device;
SensorDevice *sensor;
+ long read_int_sec;
+ read_int_sec = DeviceConfig::get_read_interval_seconds();
+ if (read_int_sec < 0)
+ read_int_sec = 600;
_dev_lst = (list<Device *> *)thread_args_pointer;
while(1) {
for (list_iter = _dev_lst->begin(); list_iter != _dev_lst->end(); list_iter++) {
sensor = dynamic_cast<SensorDevice *>(device);
if (sensor != NULL) {
sensor->get_data();
- sleep(60);
}
}
+ sleep(read_int_sec);
}
pthread_exit(NULL);
}