Log in

View Full Version : Need Function



Bobarkinator
02-05-2007, 06:37 AM
I am looking for a procedure that gets the system time then stops the script at the time designated by the function. I don't know how hard this would be but if you can do it thanks.

YoHoJo
02-05-2007, 07:12 AM
Marktime(Blah)
Repeat
DoStuff
Until (TimeFromMark(Blah)>120000)

That runs a script for a certain amount of time.

The Procedure GetSystemTime Returns the time, but i don't really understand how that works :p.

Bobarkinator
02-05-2007, 02:51 PM
and it counts in milliseconds so that would run for 2 minutes?

Boreas
02-05-2007, 03:11 PM
Yup.

You can also do
> (Minutes*60*1000))

and have Minutes be a const the user can set

Bobarkinator
02-05-2007, 04:02 PM
where yoho has it set as blah what do I need to put in?

Boreas
02-05-2007, 04:19 PM
Any variable (integer) that you want.

Bobarkinator
02-05-2007, 05:56 PM
Can someone please implant this into my script because I am having a tough time getting it to work. For some reason it just won't compile correctly so can someone put it in the script and repost please.