[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/5] gettime-res: new module
From: |
Bruno Haible |
Subject: |
Re: [PATCH 3/5] gettime-res: new module |
Date: |
Tue, 28 Dec 2021 22:41:47 +0100 |
Paul Eggert wrote:
> +static long int
> +gcd (long int a, long int b)
> +{
> + while (b != 0)
> + {
> + long int r = a % b;
> + a = b;
> + b = r;
> + }
> + return a;
> +}
We have a 'gcd' module already, that could be used here.
> + return the timer interval. For example, on AIX 7.2 POWER8
> + clock_getres yields 1 cs even though clock_gettime yields 1 µs
"1 cs"? It's the first time I see this abbreviation. It might be
more explicit to write "0.01 s" instead.
(Although, I also like to use metric prefixes where other people
don't. For example, k€ and G$. :-)
Bruno
- [PATCH 1/5] gettime: port better to non-POSIX C2x, Paul Eggert, 2021/12/28
- [PATCH 5/5] clock_getres: document portability issues better, Paul Eggert, 2021/12/28
- [PATCH 4/5] timespec_getres: new module, Paul Eggert, 2021/12/28
- [PATCH 2/5] clock_gettime: improve doc, Paul Eggert, 2021/12/28
- [PATCH 3/5] gettime-res: new module, Paul Eggert, 2021/12/28
- Re: [PATCH 3/5] gettime-res: new module,
Bruno Haible <=
- Re: [PATCH 1/5] gettime: port better to non-POSIX C2x, Bruno Haible, 2021/12/28