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);
(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
*/
#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);