Jump to content
skaterdav85

Java setTimeOut method?

Recommended Posts

Does Java have a setTimeout method like in JavaScript? I want to create a timer in an applet Im making but I couldn't find any timing methods like that.

Share this post


Link to post
Share on other sites

You can fork a thread (an instance of a class that implements Runnable) and then call sleep() on it (before making it call your method, which you can pass to it by reference).http://java.sun.com/docs/books/tutorial/es...al/concurrency/

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...