Jump to content

Random - Sleep


Recommended Posts

Hi everyone,

I'm writing a little scipt and I'd like to know how to randomize the sleep command in a specific time range.

I don't want to waste time with long variables, so I hope that you could help me with an easy command.

Link to comment
Share on other sites

:think:....

AdlibEnable('_rand',2000)

func _rand()
sleep(random(1,9999,1))
EndFunc
I cannot say that I've ever thought of doin' it that way - but you could get quite a delay:
AdlibEnable('_rand', 2000)

Global $sleeptime

_rand()

While 1
    ToolTip($sleeptime)
WEnd


Func _rand()
    $sleeptime = (Random(1, 9999, 1))
    Sleep($sleeptime)
EndFunc  ;==>_rand
Creative ELP22 :-)

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...