X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=clients%2Fmemaslap.c;h=764707b5ab2b88b4a6e2084f64828a158fdeaada;hb=15d1646b2048caffbfaf2b7562665d38afe92688;hp=37e93ec3f9efa3eb15c42ff6b6c0be402982062c;hpb=a67dd268577f479dc524bbc45e3afe170d7b9c41;p=awesomized%2Flibmemcached diff --git a/clients/memaslap.c b/clients/memaslap.c index 37e93ec3..764707b5 100644 --- a/clients/memaslap.c +++ b/clients/memaslap.c @@ -18,15 +18,13 @@ #include #include #include -#if TIME_WITH_SYS_TIME + +#if defined(HAVE_SYS_TIME_H) # include +#endif + +#if defined(HAVE_TIME_H) # include -#else -# if HAVE_SYS_TIME_H -# include -# else -# include -# endif #endif @@ -594,7 +592,7 @@ static void ms_options_parse(int argc, char *argv[]) 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 */ @@ -800,7 +798,6 @@ static void ms_print_memslap_stats(struct timeval *start_time, /* 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. */ @@ -828,6 +825,7 @@ static void ms_monitor_slap_mode() /* running in "run time" mode, user specify run time */ if (ms_setting.run_time > 0) { + int second= 0; gettimeofday(&start_time, NULL); while (1) {