I\'m having a bit of an annoying problem. Right now, I have a snippet of code that starts a thread, sets a timer within that thread, and then exits that thread and continues wit
You should use Thread.sleep function instead of TimeTask to halt execution.
Thread.sleep
TimeTask
TimerTask is not meant to halt execution, its like a clock running in background. So for your requirement you should go for Thread.sleep.
TimerTask