cvs: php4 /ext/standard microtime.c

From: Date: Sun, 04 Feb 2001 16:18:36 +0000
Subject: cvs: php4 /ext/standard microtime.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-3899@lists.php.net to get a copy of this message
jmoore Sun Feb 4 08:18:36 2001 EDT Modified files: /php4/ext/standard microtime.c Log: Always return a value even if HAVE_GETTIMEOFDAY is not set Index: php4/ext/standard/microtime.c diff -u php4/ext/standard/microtime.c:1.27 php4/ext/standard/microtime.c:1.28 --- php4/ext/standard/microtime.c:1.27 Mon Jun 5 12:47:44 2000 +++ php4/ext/standard/microtime.c Sun Feb 4 08:18:36 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: microtime.c,v 1.27 2000/06/05 19:47:44 andi Exp $ */ +/* $Id: microtime.c,v 1.28 2001/02/04 16:18:36 jmoore Exp $ */ #include "php.h" @@ -57,11 +57,13 @@ if (gettimeofday((struct timeval *) &tp, (NUL)) == 0) { msec = (double) (tp.tv_usec / MICRO_IN_SEC); sec = tp.tv_sec; - } - if (msec >= 1.0) msec -= (long) msec; - snprintf(ret, 100, "%.8f %ld", msec, sec); - RETVAL_STRING(ret,1); + + if (msec >= 1.0) msec -= (long) msec; + snprintf(ret, 100, "%.8f %ld", msec, sec); + RETVAL_STRING(ret,1); + } else #endif + RETURN_FALSE; } /* }}} */

« previous php.cvs (#3899) next »