ID: 20859
Comment by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Feature/Change Request
Operating System: any
PHP Version: 4.3.0RC2
New Comment:
in the above example, there should be a register_tick_function, of
course :)
Previous Comments:
------------------------------------------------------------------------
[2002-12-06 09:31:56] [EMAIL PROTECTED]
When using declare(ticks=xx), the ticking doesn't work in any functions
that are called from within this block. It would be really helpful (to
me, anyway :), if this worked:
$endtime=time()+10;
$abort=false;
function setabort()
{
global $endtime, $abort;
if (time()>=$endtime)
$abort=true;
}
function SomeFunc()
{
global $abort;
while (!$abort) {
// do stuff
// call func()s
// do some more stuff
}
}
declare(ticks=1000) {
SomeFunc();
}
--
now, currently this works if I put declare() blocks in SomeFunc() and
all functions it calls, but it seems a lot of work for something
simple. It would be nice if one could just turn ticks on and off
without changing every function in a script... (checking time() each
iteration is slow)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=20859&edit=1