fcgi_request request;
int repeats = 1;
int benchmark = 0;
+#if HAVE_GETTIMEOFDAY
struct timeval start, end;
+#else
+ time_t start, end;
+#endif
#ifndef PHP_WIN32
int status = 0;
#endif
case 'T':
benchmark = 1;
repeats = atoi(php_optarg);
+#ifdef HAVE_GETTIMEOFDAY
gettimeofday(&start, NULL);
+#else
+ time(&start);
+#endif
break;
case 'h':
case '?':
out:
if (benchmark) {
int sec;
+#ifdef HAVE_GETTIMEOFDAY
int usec;
gettimeofday(&end, NULL);
usec = (int)(end.tv_usec + 1000000 - start.tv_usec);
}
fprintf(stderr, "\nElapsed time: %d.%06d sec\n", sec, usec);
+#else
+ time(&end);
+ sec = (int)(end - start);
+ fprintf(stderr, "\nElapsed time: %d sec\n", sec);
+#endif
}
SG(server_context) = NULL;