@@ -91,12 +93,15 @@ public class ThrottlingExecutor {
publicvoidsubmit(TimerTasktask){
longnow=System.currentTimeMillis();
if((this.coalescePeriod>0)&&(last>0)){
if(this.coalescePeriod>0){
longelapsed=now-last;
longdelay=0;
if(elapsed<this.coalescePeriod){
delay=this.coalescePeriod-elapsed;
if(LOGGER.isDebugEnabled()){
LOGGER.debug("Task submitted within {} ms coalesce period! Deferred execution in {} ms!",this.coalescePeriod,(this.coalescePeriod-elapsed));//$NON-NLS-1$
LOGGER.debug("Task submitted within {} ms coalesce period! Deferred execution in {} ms!",this.coalescePeriod,delay);//$NON-NLS-1$
}
if(scheduled!=null){
...
...
@@ -106,13 +111,18 @@ public class ThrottlingExecutor {