Board index » jbuilder » java.util.Timer & java.util.TimerTask

java.util.Timer & java.util.TimerTask


2005-04-19 03:35:49 PM
jbuilder19
This docs says that there is stop() method somewhere:
java.sun.com/j2se/1.5.0/docs/api/java/util/Timer.html
", for example, because its stop method is invoked,"
but I can't find it. :(
However, I need a way to check when Timer have finished execution. Something
like Timer.isActive(). For example, when I call Timer.cancel() method, then
if task was running it executes to the end (it doesn't abort) and I don't
know when execution finished.
 
 

Re:java.util.Timer & java.util.TimerTask

Petar Popara wrote:
Quote
This docs says that there is stop() method somewhere:

java.sun.com/j2se/1.5.0/docs/api/java/util/Timer.html

", for example, because its stop method is invoked,"

but I can't find it. :(

However, I need a way to check when Timer have finished execution. Something
like Timer.isActive(). For example, when I call Timer.cancel() method, then
if task was running it executes to the end (it doesn't abort) and I don't
know when execution finished.


java.sun.com/docs/books/tutorial/essential/threads/timer.html
--
Regards,
Lori Olson [TeamB]
------------
Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.
Google Advanced Newsgroup Search
www.google.ca/advanced_group_search
Other Newsgroup Searches:
www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
www.visi.com/~gyles19/fom-serve/cache/1.html
 

Re:java.util.Timer & java.util.TimerTask

On 4/19/2005 at 3:35:49 AM, Petar Popara wrote:
Quote
This docs says that there is stop() method somewhere:

java.sun.com/j2se/1.5.0/docs/api/java/util/Timer.html

", for example, because its stop method is invoked,"

but I can't find it. :(
I suspect you are mixing up java.util.Timer and javax.Swing.Timer:
java.sun.com/j2se/1.5.0/docs/api/javax/swing/Timer.html
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
www.JPMcGrath.net/newsgroups/e-mail.html
 

{smallsort}