public synchronized void stopCount isRunning false public void shutdow

1
2
3
4
5
6
7
8
public synchronized void stopCount() {
isRunning = false;
}
public void shutdown() {
stopCount();
Thread.currentThread().interrupt();
}