Results 1 to 6 of 6
  1. #1
    jazz2k8's Avatar
    jazz2k8 is offline Senior Member
    Join Date
    Apr 2008
    Posts
    149
    Rep Power
    0

    Default [SOLVED] wants to run a thread at 24/7

    I want to run my thread 24/7..is it possible???

    generally we give Thread.sleep(900000000);like wise
    what is the value of 900000000 in this???

  2. #2
    sanjeevtarar's Avatar
    sanjeevtarar is offline Senior Member
    Join Date
    Apr 2008
    Location
    Jaipur(India)
    Posts
    319
    Rep Power
    10

    Default

    Thread.sleep takes time in milliseconds. So calculate it

    sanjeev


  3. #3
    jazz2k8's Avatar
    jazz2k8 is offline Senior Member
    Join Date
    Apr 2008
    Posts
    149
    Rep Power
    0

    Default

    what about 24/7??

  4. #4
    sanjeevtarar's Avatar
    sanjeevtarar is offline Senior Member
    Join Date
    Apr 2008
    Location
    Jaipur(India)
    Posts
    319
    Rep Power
    10

    Default


    What is problem with this....??

    your thread will run until or unless any interruption occur.

    You need not to specify any time for running 24/7


    sanjeev

  5. #5
    jazz2k8's Avatar
    jazz2k8 is offline Senior Member
    Join Date
    Apr 2008
    Posts
    149
    Rep Power
    0

    Default

    i got my answer

    thread.start();

    is the solution ..thanks for ur valuable time...

  6. #6
    sanjeevtarar's Avatar
    sanjeevtarar is offline Senior Member
    Join Date
    Apr 2008
    Location
    Jaipur(India)
    Posts
    319
    Rep Power
    10

    Default

    Quote Originally Posted by jazz2k8 View Post
    i got my answer

    thread.start();
    So you should have asked ...How to start thread....and you were asking other things.

    sanjeev


Similar Threads

  1. data from the main/GUI thread to another runnin thread...
    By cornercuttin in forum Threads and Synchronization
    Replies: 2
    Last Post: 04-23-2008, 10:30 PM
  2. How to get thread name
    By Java Tip in forum java.lang
    Replies: 0
    Last Post: 04-09-2008, 06:40 PM
  3. Replies: 0
    Last Post: 01-28-2008, 08:02 AM
  4. using Thread
    By one198 in forum New To Java
    Replies: 1
    Last Post: 11-21-2007, 09:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •