|
-
Aug 2nd, 2007, 07:05 AM
#1
Thread Starter
Member
[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?
-
Aug 2nd, 2007, 07:12 AM
#2
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.
-
Aug 2nd, 2007, 07:13 AM
#3
Thread Starter
Member
Re: [RESOLVED] sleep overflow
ok thx
-
Aug 2nd, 2007, 07:14 AM
#4
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|