view src/lib/time-util.h @ 9451:9fff30644260 HEAD

istream-concat: Fixed a lot of bugs.
author Timo Sirainen <tss@iki.fi>
date Mon, 26 Oct 2009 17:06:57 -0400
parents 8ca1f9f1ef2e
children
line wrap: on
line source

#ifndef TIME_UTIL_H
#define TIME_UTIL_H

struct timeval;

/* Returns -1 if tv1<tv2, 1 if tv1>tv2, 0 if they're equal. */
int timeval_cmp(const struct timeval *tv1, const struct timeval *tv2);
/* Returns tv1-tv2 in milliseconds. */
int timeval_diff_msecs(const struct timeval *tv1, const struct timeval *tv2);
/* Returns tv1-tv2 in microseconds. */
long long timeval_diff_usecs(const struct timeval *tv1,
			     const struct timeval *tv2);

#endif