diff options
author | Daniel Stenberg <daniel@haxx.se> | 2001-10-01 22:50:20 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2001-10-01 22:50:20 +0000 |
commit | f0fa858885a490c4184f82e7273656be83a5c586 (patch) | |
tree | 7ff1413dfc50aa865274585eb1a20b89c377567a /lib/timeval.c | |
parent | 3298630500cc1ee4e71ea53c4af68301a68cb35e (diff) | |
download | curl-f0fa858885a490c4184f82e7273656be83a5c586.tar.gz |
added comment to the tvdiff
Diffstat (limited to 'lib/timeval.c')
-rw-r--r-- | lib/timeval.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/timeval.c b/lib/timeval.c index 0535c1511..4099ede99 100644 --- a/lib/timeval.c +++ b/lib/timeval.c @@ -65,6 +65,10 @@ struct timeval Curl_tvnow (void) return now; } +/* + * Make sure that the first argument is the more recent time, as otherwise + * we'll get a weird negative time-diff back... + */ double Curl_tvdiff (struct timeval t1, struct timeval t2) { return (double)(t1.tv_sec - t2.tv_sec) + ((t1.tv_usec-t2.tv_usec)/1000000.0); |