#include <stdlib.h>
#include <getopt.h>
#include <limits.h>
-#if TIME_WITH_SYS_TIME
+
+#if defined(HAVE_SYS_TIME_H)
# include <sys/time.h>
+#endif
+
+#if defined(HAVE_TIME_H)
# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-# include <sys/time.h>
-# else
-# include <time.h>
-# endif
#endif
break;
case OPT_BINARY_PROTOCOL: /* --binary or -B */
- ms_setting.binary_prot= true;
+ ms_setting.binary_prot_= true;
break;
case OPT_TPS: /* --tps or -P */
/* the loop of the main thread, wait the work threads to complete */
static void ms_monitor_slap_mode()
{
- int second= 0;
struct timeval start_time, end_time;
/* Wait all the threads complete initialization. */
/* running in "run time" mode, user specify run time */
if (ms_setting.run_time > 0)
{
+ int second= 0;
gettimeofday(&start_time, NULL);
while (1)
{