Results 1 to 4 of 4

Thread: [RESOLVED] sleep overflow

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2007
    Posts
    45

    Resolved [RESOLVED] sleep overflow

    Hi, i get overflow error when i want my program to sleep 200000. What do i do if i need my program to sleep for a looooong time?

  2. #2
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629

    Re: sleep overflow

    You'll need to maintain another counter and do several sleeps. Concept similar to hours and minutes... when your gonna "overflow" the 60 minute mark you reset minutes to zero and increment hour.

  3. #3

    Thread Starter
    Member
    Join Date
    Jul 2007
    Posts
    45

    Re: [RESOLVED] sleep overflow

    ok thx

  4. #4
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: [RESOLVED] sleep overflow

    Passing 200000 to the Sleep API shouldn't be a problem since it takes a Long as the parameter. Do you have the correct declaration?

    However I don't think it's such a good idea to call sleep with such a high number since your application will not respond during that time and will appear as hung.

Posting Permissions

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



Click Here to Expand Forum to Full Width