Hi, I've readen a book that uses Java's Timer class... something like:
final Timer timer = new Timer();
timer.schedule(new TimerTask() {
public void run() {
/* Does something */
timer.cancel();
}
}, 5000);
Is there a way to implement that in PHP? I'm rewrinting the book examples in PHP. Thank you.