}
public void register(INode node) {
- // We use ths size of this map to determine whether updates are needed, this is done in AWT thread
+ // We use the size of this map to determine whether updates are needed, this is done in AWT thread
synchronized(requesters) {
if(requesters.size() == 0) {
if(state.compareAndSet(false, true)) {
- ThreadUtils.getNonBlockingWorkExecutor().scheduleAtFixedRate(this, 0, 500, TimeUnit.MILLISECONDS);
+ ThreadUtils.getNonBlockingWorkExecutor().scheduleWithFixedDelay(this, 0, 500, TimeUnit.MILLISECONDS);
}
}
ICanvasContext context = DiagramNodeUtil.getPossibleCanvasContext((G2DNode)node);
// long delay = 1000 / 25; this sounds quite frequent
long delay = 1000 / 10;
lastTrigger = System.currentTimeMillis();
- timer.scheduleAtFixedRate(task, delay, delay, TimeUnit.MILLISECONDS);
+ timer.scheduleWithFixedDelay(task, delay, delay, TimeUnit.MILLISECONDS);
}
@HintListener(Class = Hints.class, Field = "KEY_CANVAS_BOUNDS")
return;
long interval = getInterval();
- future = ThreadUtils.getNonBlockingWorkExecutor().scheduleAtFixedRate(onTimer, DEFAULT_INTERVAL, interval, TimeUnit.MILLISECONDS);
+ future = ThreadUtils.getNonBlockingWorkExecutor().scheduleWithFixedDelay(onTimer, DEFAULT_INTERVAL, interval, TimeUnit.MILLISECONDS);
}
private void cancelTimer() {