diff options
-rw-r--r-- | ctdb/include/internal/includes.h | 1 | ||||
-rw-r--r-- | ctdb/lib/util/util_time.c | 6 | ||||
-rw-r--r-- | ctdb/tools/ctdb.c | 6 |
3 files changed, 6 insertions, 7 deletions
diff --git a/ctdb/include/internal/includes.h b/ctdb/include/internal/includes.h index 951726a3961..9217dbd906c 100644 --- a/ctdb/include/internal/includes.h +++ b/ctdb/include/internal/includes.h @@ -63,7 +63,6 @@ struct timeval timeval_until(const struct timeval *tv1, const struct timeval *tv2); _PUBLIC_ struct timeval timeval_current_ofs(uint32_t secs, uint32_t usecs); double timeval_elapsed(struct timeval *tv); -double timeval_delta(struct timeval *tv2, struct timeval *tv); char **file_lines_load(const char *fname, int *numlines, size_t maxsize, TALLOC_CTX *mem_ctx); char *hex_encode_talloc(TALLOC_CTX *mem_ctx, const unsigned char *buff_in, size_t len); _PUBLIC_ int set_blocking(int fd, bool set); diff --git a/ctdb/lib/util/util_time.c b/ctdb/lib/util/util_time.c index be14f26458a..13ddfdb2b6e 100644 --- a/ctdb/lib/util/util_time.c +++ b/ctdb/lib/util/util_time.c @@ -44,12 +44,6 @@ double timeval_elapsed(struct timeval *tv) (tv2.tv_usec - tv->tv_usec)*1.0e-6; } -double timeval_delta(struct timeval *tv2, struct timeval *tv) -{ - return (tv2->tv_sec - tv->tv_sec) + - (tv2->tv_usec - tv->tv_usec)*1.0e-6; -} - /** return a timeval struct with the given elements */ diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c index 19a2fb150be..cc8e37c4108 100644 --- a/ctdb/tools/ctdb.c +++ b/ctdb/tools/ctdb.c @@ -57,6 +57,12 @@ static struct { #define TIMELIMIT() timeval_current_ofs(options.timelimit, 0) #define LONGTIMELIMIT() timeval_current_ofs(LONGTIMEOUT, 0) +static double timeval_delta(struct timeval *tv2, struct timeval *tv) +{ + return (tv2->tv_sec - tv->tv_sec) + + (tv2->tv_usec - tv->tv_usec)*1.0e-6; +} + static int control_version(struct ctdb_context *ctdb, int argc, const char **argv) { printf("CTDB version: %s\n", CTDB_VERSION_STRING); |