View Full Version : is there a way for a function to exec by itself

05-07-2004, 07:54 AM
I'm making a game sort of thing in PHP and I was wondering if there was a way in PHP that I can pause the execution of a function after x seconds. I don't want the whole script to stop working though, so for example
// function 1

(pauses for 10 seconds) {
// function 2

// function 3

i want the script to execute like normal, but pause for 10 seconds before executing function 2, so it would execute function 1 and function 3 then 10 seconds later, execute function 2

this is exactly like the fork() statement found in MOO programming

go here to get a clearer definition.

is there a way to do this in PHP?

05-07-2004, 09:28 AM

===> make sure to read the usercomments for less resourceeating hacks !