CVS update: php3/functions
| From: | sas | Date: | Wed, 20 Jan 1999 21:15:50 +0000 |
| Subject: | CVS update: php3/functions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-3649@lists.php.net to get a copy of this message | ||
Date: Wednesday January 20, 1999 @ 16:15
Author: sas
Update of /repository/php3/functions
In directory asf:/u/temp/cvs-serv5269
Modified Files:
microtime.c
Log Message:
interface change for gettimeofday()
Index: php3/functions/microtime.c
diff -c php3/functions/microtime.c:1.27 php3/functions/microtime.c:1.28
*** php3/functions/microtime.c:1.27 Fri Jan 8 09:48:01 1999
--- php3/functions/microtime.c Wed Jan 20 16:15:49 1999
***************
*** 27,33 ****
+----------------------------------------------------------------------+
*/
! /* $Id: microtime.c,v 1.27 1999/01/08 14:48:01 martin Exp $ */
#include "php.h"
#include <stdlib.h>
--- 27,33 ----
+----------------------------------------------------------------------+
*/
! /* $Id: microtime.c,v 1.28 1999/01/20 21:15:49 sas Exp $ */
#include "php.h"
#include <stdlib.h>
***************
*** 93,103 ****
{
#if HAVE_GETTIMEOFDAY
struct timeval tp;
! if(gettimeofday(&tp, (struct timezone *) 0) == 0) {
array_init(return_value);
! add_next_index_long(return_value, tp.tv_sec);
! add_next_index_long(return_value, tp.tv_usec);
} else {
RETURN_FALSE;
}
--- 93,106 ----
{
#if HAVE_GETTIMEOFDAY
struct timeval tp;
+ struct timezone tz;
! if(gettimeofday(&tp, &tz) == 0) {
array_init(return_value);
! add_assoc_long(return_value, "sec", tp.tv_sec);
! add_assoc_long(return_value, "usec", tp.tv_usec);
! add_assoc_long(return_value, "minuteswest", tz.tz_minuteswest);
! add_assoc_long(return_value, "dsttime", tz.tz_dsttime);
} else {
RETURN_FALSE;
}
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net