private static void callTimeoutTasks(){
  if (timeoutTaskLog.isLoggable(PlatformLogger.Level.FINER)) {
    timeoutTaskLog.finer("XToolkit.callTimeoutTasks(): current time={0}" + ";  tasks={1}",Long.valueOf(System.currentTimeMillis()),timeoutTasks);
  }
  if (timeoutTasks == null || timeoutTasks.isEmpty()) {
    return;
  }
  Long currentTime=Long.valueOf(System.currentTimeMillis());
  Long time=(Long)timeoutTasks.firstKey();
  while (time.compareTo(currentTime) <= 0) {
    java.util.List tasks=(java.util.List)timeoutTasks.remove(time);
    for (Iterator iter=tasks.iterator(); iter.hasNext(); ) {
      Runnable task=(Runnable)iter.next();
      if (timeoutTaskLog.isLoggable(PlatformLogger.Level.FINER)) {
        timeoutTaskLog.finer("XToolkit.callTimeoutTasks(): current time={0}" + ";  about to run task={1}",Long.valueOf(currentTime),task);
      }
      try {
        task.run();
      }
 catch (      ThreadDeath td) {
        throw td;
      }
catch (      Throwable thr) {
        processException(thr);
      }
    }
    if (timeoutTasks.isEmpty()) {
      break;
    }
    time=(Long)timeoutTasks.firstKey();
  }
}

private static void callTimeoutTasks ( ) { if ( timeoutTaskLog . isLoggable ( PlatformLogger . Level . FINER ) ) { timeoutTaskLog . finer ( "XToolkit.callTimeoutTasks(): current time={0}" + ";  tasks={1}" , Long . valueOf ( System . currentTimeMillis ( ) ) , timeoutTasks ) ; } if ( timeoutTasks == null || timeoutTasks . isEmpty ( ) ) { return ; } Long currentTime = Long . valueOf ( System . currentTimeMillis ( ) ) ; Long time = ( Long ) timeoutTasks . firstKey ( ) ; while ( time . compareTo ( currentTime ) <= 0 ) { java . util . List tasks = ( java . util . List ) timeoutTasks . remove ( time ) ; for ( Iterator iter = tasks . iterator ( ) ; iter . hasNext ( ) ; ) { Runnable task = ( Runnable ) iter . next ( ) ; if ( timeoutTaskLog . isLoggable ( PlatformLogger . Level . FINER ) ) { timeoutTaskLog . finer ( "XToolkit.callTimeoutTasks(): current time={0}" + ";  about to run task={1}" , Long . valueOf ( currentTime ) , task ) ; } try { task . run ( ) ; } catch ( ThreadDeath td ) { throw td ; } catch ( Throwable thr ) { processException ( thr ) ; } } if ( timeoutTasks . isEmpty ( ) ) { break ; } time = ( Long ) timeoutTasks . firstKey ( ) ; } }
executes mature timeout tasks registered with schedule ( ) . called from run ( ) under awtlock .
