...

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



o0katz0o
05-07-2004, 06: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.
ftp://ftp.research.att.com/dist/eostrom/MOO/html/ProgrammersManual_37.html#SEC37

is there a way to do this in PHP?

raf
05-07-2004, 08:28 AM
http://www.php.net/usleep

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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum