• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Will a timer work again after canceling it , and called the schedule method,i get exc

 
Ranch Hand
Posts: 551
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
Thank you for reading my post.
I have a timer , i cancel it once .
now i want to use it again ? should i create the timer and then use its
schedule method ? or i can use it in a cancelled timer?
I tried to use the timer without re-creatig it but it return the following exception.
The task that i want to use is the same as the task it had before cancelling.


thank you
[ October 30, 2005: Message edited by: raminaa niilian ]
 
Sheriff
Posts: 22801
131
Eclipse IDE Spring Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well the exception says it all: you cannot restart the timer after it has been cancelled. Nearly the same as Threads.

There is only one option, and that is to create a new timer and use that.
 
We're all out of roofs. But we still have tiny ads:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic