K3STROS

Why doent my sleep() work

4 posts in this topic

Self explanatory, why doesn't this work?

Sleep((Random, 990, 1990, 1))

Thanks in advance

Share this post


Link to post
Share on other sites



As Jos said.  Bad Syntax.

 

Break it down into it's pieces and then put them together.

$iTime = Random(990, 1990, 1)
Sleep($iTime)

;or

Sleep(Random(990, 1990, 1))

 

1 person likes this

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

 

$iTime = Random(990, 1990, 1)
Sleep($iTime)

;or

Sleep(Random(990, 1990, 1))

Works perfectly! Thanks alot!

 

Had it coded properly in the rest on my code <_< guess i must of type wrong then copy/paste :sweating:

 

Edited by K3STROS
Figured it out

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Similar Content

    • Pured
      By Pured
      Consider the following two scenarios:
      While(1) Sleep(10) WEnd and
      While(1) Sleep(100000) WEnd  
      How does Sleep() work for the above two cases? Do they both use the same amount of cpu time?
      I think the second scenario will check the time difference just as often as the first scenario, meaning the exact same amount of resources is spent in both scenarios. The only difference is that the second scenario waits longer before going to WEnd?
      Is that correct? Or is doing Sleep(100000) better than doing Sleep(10)?
       
      Extra question:
      Which is more computationally efficient if I want an infinite loop running in the background?
      The above question's answer or:
      While(1) WEnd  
      Thank you in advance.