public TimeCounter start(){
switch (state) {
case UNSTARTED:
    startTimeMillis=System.currentTimeMillis();
  break;
case RUNNING:
throw new IllegalStateException("Already started");
case STOPPED:
startTimeMillis+=System.currentTimeMillis() - stopTimeMillis;
break;
default :
throw new IllegalStateException("Unrecognized state " + state);
}
state=State.RUNNING;
return this;
}

public TimeCounter start ( ) { switch ( state ) { case UNSTARTED : startTimeMillis = System . currentTimeMillis ( ) ; break ; case RUNNING : throw new IllegalStateException ( "Already started" ) ; case STOPPED : startTimeMillis += System . currentTimeMillis ( ) - stopTimeMillis ; break ; default : throw new IllegalStateException ( "Unrecognized state " + state ) ; } state = State . RUNNING ; return this ; }
starts or resumes the time count .
