private void refreshPhases(){
  for (int i=0; i < phaseList.size(); i++) {
    Phase p=phaseList.get(i);
    if (TimelineAlgos.isRunningNow(p.getStartTime(),p.getEndTime())) {
      p.setRunning(true);
      currentPhase=p;
      currentPhasePosition=i;
    }
 else {
      p.setRunning(false);
    }
  }
}

private void refreshPhases ( ) { for ( int i = 0 ; i < phaseList . size ( ) ; i ++ ) { Phase p = phaseList . get ( i ) ; if ( TimelineAlgos . isRunningNow ( p . getStartTime ( ) , p . getEndTime ( ) ) ) { p . setRunning ( true ) ; currentPhase = p ; currentPhasePosition = i ; } else { p . setRunning ( false ) ; } } }
this function is used to find the current running phase in timeline .
