Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Threads
Search Coderanch
Advance search
Google search
Register / Login
Help coderanch get a
new server
by contributing to the
fundraiser
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
Devaka Cooray
Liutauras Vilda
Sheriffs:
Jeanne Boyarsky
paul wheaton
Henry Wong
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Tim Moores
Carey Brown
Mikalai Zaikin
Bartenders:
Lou Hamers
Piet Souris
Frits Walraven
Forum:
Threads and Synchronization
thread 101
Kate Zoy
Ranch Hand
Posts: 33
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I need to have something in my program refreshed every 2 seconds. I have done threads a really long time ago, and I can't remember how to create this simple
thread
. What's the simplest way?
Thanks
alot
!!
Yaroslav Chinskiy
Ranch Hand
Posts: 147
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Kate,
For running something every 2 sec u dont need a therad, look at java.util.Timer
You can also check a tutorial at
http://java.sun.com/docs/books/tutorial/essential/threads/index.html
Kate Zoy
Ranch Hand
Posts: 33
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Thanks alot. I did read about the timer and it was very easy. My code works perfectly
Thanks for the advice!
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
how to kill main thread and relative subthread?
Info: Memorizing Deployment Descriptor
Entity Bean
best english movies
Thread names??
More...