Пример #1
0
 public void run() {
   while (true) {
     if (isPaused == false) {
       try {
         Thread.sleep(500);
         if (!isHalfTime) {
           calculateTime();
           fieldPanel.updateClock(time);
         } else if (isHalfTime && counter == 0) {
           Thread.sleep(100);
           fieldPanel.reset();
           this.endHalfTime();
           fieldPanel.setHalfTime();
           // mClientPanels.switchToResults();
         } else {
           Thread.sleep(500);
           mClientPanels.switchToResults();
           break;
         }
       } catch (InterruptedException ie) {
         ie.printStackTrace();
       }
     } else {
       try {
         Thread.sleep(1);
       } catch (InterruptedException e) {
         // TODO Auto-generated catch block
         e.printStackTrace();
       }
     }
   }
 }
Пример #2
0
 public void startSecondHalf() {
   fieldPanel.reset();
   start = System.currentTimeMillis();
   time = "0:00";
 }