From 532bca41e59e10a86c356058831cf046a3ba78c9 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 12 Oct 2001 12:32:20 +0000 Subject: Curl_tvdiff() now returns a millisecond diff, no double like before --- lib/connect.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/connect.c') diff --git a/lib/connect.c b/lib/connect.c index 1ec33ecab..df34d7edc 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -353,7 +353,7 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */ if(data->set.timeout || data->set.connecttimeout) { double has_passed; - /* Evaluate how much that that has passed */ + /* Evaluate in milliseconds how much time that has passed */ has_passed = Curl_tvdiff(Curl_tvnow(), data->progress.start); #ifndef min @@ -368,7 +368,7 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */ timeout_ms = data->set.connecttimeout*1000; /* subtract the passed time */ - timeout_ms -= (long)(has_passed * 1000); + timeout_ms -= (long)has_passed; if(timeout_ms < 0) /* a precaution, no need to continue if time already is up */ @@ -436,7 +436,7 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */ /* get a new timeout for next attempt */ after = Curl_tvnow(); - timeout_ms -= (long)(Curl_tvdiff(after, before)*1000); + timeout_ms -= Curl_tvdiff(after, before); if(timeout_ms < 0) { failf(data, "connect() timed out!"); return CURLE_OPERATION_TIMEOUTED; @@ -521,7 +521,7 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */ if(0 != rc) { /* get a new timeout for next attempt */ after = Curl_tvnow(); - timeout_ms -= (long)(Curl_tvdiff(after, before)*1000); + timeout_ms -= Curl_tvdiff(after, before); if(timeout_ms < 0) { failf(data, "Connect timeout on IP number %d", aliasindex+1); break; -- cgit v1.2.3