Skip to content
This repository has been archived by the owner on Oct 4, 2020. It is now read-only.

Commit

Permalink
list initialization.
Browse files Browse the repository at this point in the history
  • Loading branch information
rradev committed Jan 11, 2017
1 parent 51cec8a commit d72cc14
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/net/iosynth/device/DeviceControl.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,14 @@ public void addDevice(Device dev){
*
*/
public void forever() {
devsHandleFixedList = new ArrayList<>();
devsHandleDelayList = new ArrayList<>();

// Devices with fixed arrival interval
for(final Runnable devR: devsFixedList){
final Device dev = (Device)devR;
ScheduledFuture<?> devHandle = scheduler.scheduleAtFixedRate(dev, ((ArrivalFixed)dev.getArrival()).getJitter(), dev.getArrival().getInterval(), TimeUnit.MILLISECONDS);
devsHandleFixedList.add(devHandle);
//devsHandleFixedList.add(devHandle);
}
// Devices with variable arrival interval. They have to be re-scheduled each time.
for(Runnable dev: devsDelayList){
Expand Down

0 comments on commit d72cc14

Please sign in to comment.