bug-gnulib
[Top][All Lists]
Advanced

[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






reply via email to

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