aboutsummaryrefslogtreecommitdiff
path: root/lib/progress.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-04-09 09:36:31 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-04-09 09:36:31 +0000
commit2fd463e979ca57c07be4c54e945c33de8651c17c (patch)
treefabfe5f019682c002eb3d83d3df50af9ffbe7c5c /lib/progress.c
parentde8660a96a8dca55f2a8c194a997fe50bba5864b (diff)
Dirk Manske increased the resolution for what the CURLINFO_*_TIME return.
Diffstat (limited to 'lib/progress.c')
-rw-r--r--lib/progress.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/progress.c b/lib/progress.c
index 8c7ef3558..55bc3ceec 100644
--- a/lib/progress.c
+++ b/lib/progress.c
@@ -148,26 +148,26 @@ void Curl_pgrsTime(struct SessionHandle *data, timerid timer)
case TIMER_NAMELOOKUP:
data->progress.t_nslookup =
- (double)Curl_tvdiff(Curl_tvnow(), data->progress.t_startsingle)/1000.0;
+ Curl_tvdiff_secs(Curl_tvnow(), data->progress.t_startsingle);
break;
case TIMER_CONNECT:
data->progress.t_connect =
- (double)Curl_tvdiff(Curl_tvnow(), data->progress.t_startsingle)/1000.0;
+ Curl_tvdiff_secs(Curl_tvnow(), data->progress.t_startsingle);
break;
case TIMER_PRETRANSFER:
data->progress.t_pretransfer =
- (double)Curl_tvdiff(Curl_tvnow(), data->progress.t_startsingle)/1000.0;
+ Curl_tvdiff_secs(Curl_tvnow(), data->progress.t_startsingle);
break;
case TIMER_STARTTRANSFER:
data->progress.t_starttransfer =
- (double)Curl_tvdiff(Curl_tvnow(), data->progress.t_startsingle)/1000.0;
+ Curl_tvdiff_secs(Curl_tvnow(), data->progress.t_startsingle);
break;
case TIMER_POSTRANSFER:
/* this is the normal end-of-transfer thing */
break;
case TIMER_REDIRECT:
data->progress.t_redirect =
- (double)Curl_tvdiff(Curl_tvnow(), data->progress.start)/1000.0;
+ Curl_tvdiff_secs(Curl_tvnow(), data->progress.start);
break;
}
}
@@ -249,8 +249,8 @@ int Curl_pgrsUpdate(struct connectdata *conn)
now = Curl_tvnow(); /* what time is it */
/* The time spent so far (from the start) */
- data->progress.timespent = Curl_tvdiff(now, data->progress.start)/1000.0;
- timespent = (long)data->progress.timespent;
+ data->progress.timespent = Curl_tvdiff_secs(now, data->progress.start);
+ timespent = (long)data->progress.timespent*1000.0;
/* The average download speed this far */
data->progress.dlspeed =