[Top][All Lists]

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

Re: bug in xtime.h

From: Paul Eggert
Subject: Re: bug in xtime.h
Date: Sun, 22 Dec 2019 22:59:39 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2

Right you are; I should have measured. Though if speed's the deal, the following
code should be faster than the other options mentioned, as it should avoid both
conditional branches and compilers' overoptimizations.

  return (t + (t < 0)) / 1000000000 - (t < 0);

reply via email to

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