public TimeCounter stop(){
switch (state) {
case UNSTARTED:
    throw new IllegalStateException("Not started. ");
case STOPPED:
  throw new IllegalStateException("Already stopped. ");
case RUNNING:
this.stopTimeMillis=System.currentTimeMillis();
default :
state=State.STOPPED;
return this;
}
}

public TimeCounter stop ( ) { switch ( state ) { case UNSTARTED : throw new IllegalStateException ( "Not started. " ) ; case STOPPED : throw new IllegalStateException ( "Already stopped. " ) ; case RUNNING : this . stopTimeMillis = System . currentTimeMillis ( ) ; default : state = State . STOPPED ; return this ; } }
stops or suspends the time count .
