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: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Duration for GNAT on ARM Date: Tue, 23 Dec 2014 21:21:57 +0000 Organization: A noiseless patient Spider Message-ID: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="da19c0dc8eec016b1dd8c302a793eb7c"; logging-data="6584"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/KqS39APAJqKStyGF+pomNtae0569OMEk=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin) Cancel-Lock: sha1:iZzU6a5VEUYI1ci7RnaXJWZIsg4= sha1:/UKuptWYvugoJ3h8Xd7My1R7Bi4= Xref: news.eternal-september.org comp.lang.ada:24207 Date: 2014-12-23T21:21:57+00:00 List-Id: You use -gnatS to get GNAT to output a representation of package Standard. If you do this with a native compiler, you get (typically) type Duration is delta 0.000000001 range -((2 ** 63 - 1) * 0.000000001) .. +((2 ** 63 - 1) * 0.000000001); for Duration'Small use 0.000000001; 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? On the STM32's with STMicroelectronics' HAL, the tick is 1 kHz.