From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: border2.nntp.dca1.giganews.com!nntp.giganews.com!newspeer1.nac.net!feeder.erje.net!eu.feeder.erje.net!news.swapon.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: Duration for GNAT on ARM Date: Tue, 23 Dec 2014 23:52:13 +0100 Organization: A noiseless patient Spider Message-ID: References: <14woqdx7yg0ry.eghy2k6aafqc.dlg@40tude.net> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Injection-Date: Tue, 23 Dec 2014 22:51:52 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="2b3884a634d8f846e0712b4e3a92507a"; logging-data="27953"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19clEKZUgVpB7L5/rwmGRHi" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 In-Reply-To: <14woqdx7yg0ry.eghy2k6aafqc.dlg@40tude.net> Cancel-Lock: sha1:wY+T/C55mYtvf2gIgIk1sTL1qok= Xref: number.nntp.giganews.com comp.lang.ada:191517 Date: 2014-12-23T23:52:13+01:00 List-Id: Le 23/12/2014 23:42, Dmitry A. Kazakov a écrit : > However, if I do this with both GNAT GPL 2014 and FSF GCC 4.9.1 >> cross-compiling to arm-eabi for the STM32F4 family (Cortex M4), I get >> >> type Duration is delta 0.020 >> range -((2 ** 31 - 1) * 0.020) .. >> +((2 ** 31 - 1) * 0.020); >> for Duration'Small use 0.020; >> >> I can understand the 32-bit vs 64-bit part - a misguided attempt at >> efficiency, perhaps - but who gets to say that the clock runs at 50 Hz? Duration'small is not related to the accuracy of the hardware clock, it's just the elementary step for time. Ada.Real_Time might be more useful for you. -- J-P. Rosen Adalog 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00 http://www.adalog.fr