i have a GUI
with play and pause buttons. play button when pressed, schedules a timer according to a time stamp read from a file and publish some data t the network according to the time stamp. For an example, if the fie i am processing has the following timestamp:
.00111 .0222 .025585
after first time stamp data will be publishe dto the network and so for the rest of the entire time stamps.
despite when pause button is clicked, i cancel
and purge
the timer, i receive the below errors from the console.
why i receive such errors as long as i cancel
and purge
the timer.
Update_1
is the console o/p could be just because of too many qeued timers were scheduled and after pressing pause "timer.cancel and timer.purge) theycan not be run/scheduled" anymore?
console o/p after pause buton is pressed:
Exception in thread "TimeStampThread_1_29.372000000003" java.lang.IllegalStateException:
Timer already cancelled.
at java.util.Timer.sched(Unknown Source)
at java.util.Timer.schedule(Unknown Source)
at org.eclipse.paho.sample.GuiMenuBar$TimeStampTimerThread.run(GuiMenuBar.java:966)
at java.lang.Thread.run(Unknown Source)
Exception in thread "TimeStampThread_1_29.252000000000" java.lang.IllegalStateException: Timer
already cancelled.
at java.util.Timer.sched(Unknown Source)
at java.util.Timer.schedule(Unknown Source)
at org.eclipse.paho.sample.GuiMenuBar$TimeStampTimerThread.run(GuiMenuBar.java:966)
at java.lang.Thread.run(Unknown Source)
Exception in thread "TimeStampThread_1_29.302000000003" java.lang.IllegalStateException: Timer
already cancelled.
at java.util.Timer.sched(Unknown Source)
at java.util.Timer.schedule(Unknown Source)