wget-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Wget-dev] wget2 | WIP: Implemented limit-rate feature (!420)


From: Tim Rühsen
Subject: Re: [Wget-dev] wget2 | WIP: Implemented limit-rate feature (!420)
Date: Mon, 22 Apr 2019 18:08:16 +0000



Tim Rühsen started a new discussion on tests/test-limit-rate.c: 
https://gitlab.com/gnuwget/wget2/merge_requests/420#note_162975301

> +static long long start;
> +static long long elapsed;
> +static long long desired;
> +static long long tolerance;
> +static long long normal_elapsed;
> +
> +long long get_timestamp(void);
> +
> +long long get_timestamp(void) {
> +     struct timeval tv;
> +     gettimeofday(&tv, NULL);
> +     return tv.tv_sec * SECONDS + tv.tv_usec;
> +}
> +
> +#define WITHIN_RANGE(value, desired, tolerance) \
> +                                             ((value <= desired + tolerance) 
> && (value >= desired - tolerance))

Breaking long lines and doing the indentation correctly: In the second line 
start with the same number of tabs as in the first line. Then use spaces for 
fine-tuning. That way everybody can use it's own tab width setting with the 
intended column alignment.

Same for the long lines further down.

-- 
Reply to this email directly or view it on GitLab: 
https://gitlab.com/gnuwget/wget2/merge_requests/420#note_162975301
You're receiving this email because of your account on gitlab.com.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]