Welcome, Guest. Please login or register.
Did you miss your activation email?
Pages: [1]   Go Down
  Print  
Author Topic: How to set a timerinterval?  (Read 1230 times)
0 Members and 1 Guest are viewing this topic.
Arkie
Javaforums.net Admin
Senior Member
*

Reputation: 16
Developer @ Javaforums.net
Offline Offline
Posts: 2593
Referrals: 13

WWW Awards
« on: June 11, 2007, 06:04:14 PM »

I'm aware that i can delay the application by using Thread.sleep(time); but this will lock up the entire application.
I suppose i can create another thread and let that perform a task that i want it to do but im sure there are better and more efficient ways to do so.

I've stumbled on timer/timertask but i'm unable to get it to work. Does anyone have an example or demo that performs a task after a certain interval e.g. after 5 seconds?
Logged

Java and .NET developer

To students: It doesn't matter how hard you've studied; the material won't be on the exam anyway.

Fan of http://www.retardedweblogger.com
Oh man, too much stuff to do in so little time.

http://img222.imageshack....707/arkietomatoesmall.jpg
Blizzcon 2k9 Grubby and Cassandra Ng engaged ! <3
Triple D, eerste Denken Dan Doen
Pages: [1]   Go Up
  Print  
 
Jump to:  

Your Ad Here