Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Thread for a given time window

  1. #1
    Junior Member
    Join Date
    Nov 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Thread for a given time window

    I'd like to run a Listener in a Thread from a certain point of time on for a certain amount of time (some hours).
    I found Timer and TimerTask classes, however JavaDoc tells me that TimerTasks should complete quickly, which is not the case for my Thread. Is there a better and easy possibility to achieve the task?
    Thanks


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Thread for a given time window

    What are you trying to do? What do you mean by "Listener in a Thread"? Listener for what?

Similar Threads

  1. Replies: 4
    Last Post: July 21st, 2010, 04:07 PM
  2. set time limit on running of a thread
    By z.zojaji in forum Threads
    Replies: 3
    Last Post: July 10th, 2010, 10:57 AM
  3. cmd.exe DOS Window
    By Curious in forum File I/O & Other I/O Streams
    Replies: 4
    Last Post: March 1st, 2010, 10:30 AM
  4. Navigating from one window to another
    By visharaddhavle83 in forum AWT / Java Swing
    Replies: 2
    Last Post: August 6th, 2009, 07:55 AM
  5. I'm not sure how to initialize GraphicsDevice and Window
    By DotChris in forum AWT / Java Swing
    Replies: 3
    Last Post: July 15th, 2009, 09:00 AM

Tags for this Thread