Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-07-2004, 06:54 AM   PM User | #1
o0katz0o
New Coder

 
Join Date: Apr 2004
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
o0katz0o is an unknown quantity at this point
executing function at a later time

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/eost..._37.html#SEC37

is there a way to do this in PHP?

Last edited by o0katz0o; 05-07-2004 at 07:29 AM..
o0katz0o is offline   Reply With Quote
Old 05-07-2004, 08:28 AM   PM User | #2
raf
Master Coder


 
Join Date: Jul 2002
Posts: 6,589
Thanks: 0
Thanked 0 Times in 0 Posts
raf will become famous soon enoughraf will become famous soon enough
http://www.php.net/usleep

===> make sure to read the usercomments for less resourceeating hacks !
__________________
Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html
raf is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:42 AM.


Advertisement
Log in to turn off these ads.