public final void run(){
  if (m_start == 0)   m_start=System.currentTimeMillis();
  m_canContinue=true;
  while (m_canContinue) {
    if (isInterrupted())     return;
    m_lastStart=System.currentTimeMillis();
    m_working=true;
    try {
      m_pollCount++;
      if (canDoWork()) {
        m_canContinue=doWork();
        m_count++;
      }
    }
 catch (    Exception e) {
      log.log(Level.SEVERE,"run",e);
    }
    m_working=false;
    long end=System.currentTimeMillis();
    m_time+=(end - m_lastStart);
    if (isInterrupted())     return;
    try {
      log.fine("sleeping ... " + m_sleepSeconds);
      sleep(m_sleepSeconds * 1000);
    }
 catch (    InterruptedException e1) {
      log.warning("run - " + e1.getLocalizedMessage());
      return;
    }
  }
}

public final void run ( ) { if ( m_start == 0 ) m_start = System . currentTimeMillis ( ) ; m_canContinue = true ; while ( m_canContinue ) { if ( isInterrupted ( ) ) return ; m_lastStart = System . currentTimeMillis ( ) ; m_working = true ; try { m_pollCount ++ ; if ( canDoWork ( ) ) { m_canContinue = doWork ( ) ; m_count ++ ; } } catch ( Exception e ) { log . log ( Level . SEVERE , "run" , e ) ; } m_working = false ; long end = System . currentTimeMillis ( ) ; m_time += ( end - m_lastStart ) ; if ( isInterrupted ( ) ) return ; try { log . fine ( "sleeping ... " + m_sleepSeconds ) ; sleep ( m_sleepSeconds * 1000 ) ; } catch ( InterruptedException e1 ) { log . warning ( "run - " + e1 . getLocalizedMessage ( ) ) ; return ; } } }
run - do the work
