From fbc6f0e5edc09af9ae0226f77b59d7ffc3a76858 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 22 Apr 2014 14:43:42 +0200 Subject: php-pecl-hrtime: 0.4.3 - New package --- hrtime-svn.patch | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 hrtime-svn.patch (limited to 'hrtime-svn.patch') diff --git a/hrtime-svn.patch b/hrtime-svn.patch new file mode 100644 index 0000000..5efc701 --- /dev/null +++ b/hrtime-svn.patch @@ -0,0 +1,61 @@ +--- 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 ++ -- cgit