Re: threading in php-gtk
| From: | Andrei Zmievski | Date: | Mon, 18 Jun 2001 21:36:18 +0000 |
| Subject: | Re: threading in php-gtk | ||
| References: | 1 | Groups: | php.gtk |
| Request: | Send a blank email to php-gtk+get-1918@lists.php.net to get a copy of this message | ||
On Mon, 18 Jun 2001, Julia A. Case wrote:
> I'm porting a program from java to php-gtk that I wrote a long time ago
> (http://www.MageNet.com/~julie/java/hyper) and I'd like to know if there
> is a way to make a loop that runs every second or so and calls a procedure
> to update the screen.
You can use gtk::timeout_add(). Example:
function callback($arg1, $arg2)
{
...
}
gtk::timeout_add(1000, 'callback', $arg1, $arg2);
-Andrei
"Claiming Java is easier than C++ is like
saying that K2 is shorter than Everest."
-- Larry O'Brien (editor, Software Development)