--- pecl/hrtime/trunk/tests/001.phpt 2014/04/22 09:35:46 333402 +++ pecl/hrtime/trunk/tests/001.phpt 2014/04/22 11:33:51 333403 @@ -11,13 +11,11 @@ $c = new HRTime\StopWatch; $t0 = microtime(true); - for ($i = 0; $i < 1024; $i++); - $t1 = microtime(true); - $elapsed0 = $t1 - $t0; - $c->start(); - for ($i = 0; $i < 1024; $i++); + for ($i = 0; $i < (1024*1024); $i++); + $t1 = microtime(true); $c->stop(); + $elapsed0 = $t1 - $t0; $e0 = $elapsed0; $e1 = $c->getLastElapsedTime(HRTime\Unit::SECOND); --- pecl/hrtime/trunk/tests/004.phpt 2014/04/22 09:35:46 333402 +++ pecl/hrtime/trunk/tests/004.phpt 2014/04/22 11:33:51 333403 @@ -11,13 +11,11 @@ $c = new HRTime\StopWatch; $t0 = microtime(true); - usleep(1); - $t1 = microtime(true); - $elapsed0 = $t1 - $t0; - $c->start(); usleep(1); + $t1 = microtime(true); $c->stop(); + $elapsed0 = $t1 - $t0; $e0 = $elapsed0; $e1 = $c->getLastElapsedTime(HRTime\Unit::SECOND); =================================================================== --- pecl/hrtime/trunk/config.m4 (révision 333402) +++ pecl/hrtime/trunk/config.m4 (copie de travail) @@ -7,6 +7,7 @@ [ --enable-hrtime Enable hrtime support]) if test "$PHP_HRTIME" != "no"; then - PHP_ADD_LIBRARY(rt) + PHP_ADD_LIBRARY(rt,,HRTIME_SHARED_LIBADD) + PHP_SUBST(HRTIME_SHARED_LIBADD) PHP_NEW_EXTENSION(hrtime, hrtime.c timer.c, $ext_shared) fi =================================================================== --- pecl/hrtime/trunk/timer.h (révision 333402) +++ pecl/hrtime/trunk/timer.h (copie de travail) @@ -75,3 +75,8 @@ \return Current timestamp, in milliseconds */ TIMER_API tick_t timer_system( void ); +/* Compatibility stuff for php < 5.3.7*/ +#ifndef PHP_FE_END +#define PHP_FE_END {NULL, NULL, NULL} +#endif +