summaryrefslogtreecommitdiff
path: root/lib/progress.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2017-07-28 15:49:36 +0200
committerDaniel Stenberg <daniel@haxx.se>2017-07-28 15:51:25 +0200
commit4dee50b9c80f9b18d2eb9a1c20bd879abb342302 (patch)
tree7a9c5ddd299e23ad27c7efa6a8759ae3122f31c9 /lib/progress.c
parent7551e55d6614cddb039602e08f3d7aa302299617 (diff)
downloadcurl-4dee50b9c80f9b18d2eb9a1c20bd879abb342302.tar.gz
timeval: struct curltime is a struct timeval replacement
... to make all libcurl internals able to use the same data types for the struct members. The timeval struct differs subtly on several platforms so it makes it cumbersome to use everywhere. Ref: #1652 Closes #1693
Diffstat (limited to 'lib/progress.c')
-rw-r--r--lib/progress.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/progress.c b/lib/progress.c
index e92d96fdc..740ff2887 100644
--- a/lib/progress.c
+++ b/lib/progress.c
@@ -166,7 +166,7 @@ void Curl_pgrsResetTimesSizes(struct Curl_easy *data)
*/
void Curl_pgrsTime(struct Curl_easy *data, timerid timer)
{
- struct timeval now = Curl_tvnow();
+ struct curltime now = Curl_tvnow();
time_t *delta = NULL;
switch(timer) {
@@ -260,8 +260,8 @@ void Curl_pgrsStartNow(struct Curl_easy *data)
long Curl_pgrsLimitWaitTime(curl_off_t cursize,
curl_off_t startsize,
curl_off_t limit,
- struct timeval start,
- struct timeval now)
+ struct curltime start,
+ struct curltime now)
{
curl_off_t size = cursize - startsize;
time_t minimum;
@@ -287,7 +287,7 @@ long Curl_pgrsLimitWaitTime(curl_off_t cursize,
void Curl_pgrsSetDownloadCounter(struct Curl_easy *data, curl_off_t size)
{
- struct timeval now = Curl_tvnow();
+ struct curltime now = Curl_tvnow();
data->progress.downloaded = size;
@@ -305,7 +305,7 @@ void Curl_pgrsSetDownloadCounter(struct Curl_easy *data, curl_off_t size)
void Curl_pgrsSetUploadCounter(struct Curl_easy *data, curl_off_t size)
{
- struct timeval now = Curl_tvnow();
+ struct curltime now = Curl_tvnow();
data->progress.uploaded = size;
@@ -351,7 +351,7 @@ void Curl_pgrsSetUploadSize(struct Curl_easy *data, curl_off_t size)
*/
int Curl_pgrsUpdate(struct connectdata *conn)
{
- struct timeval now;
+ struct curltime now;
int result;
char max5[6][10];
curl_off_t dlpercen=0;