comp.lang.ada
 help / color / mirror / Atom feed
From: "J-P. Rosen" <rosen@adalog.fr>
Subject: Re: Duration for GNAT on ARM
Date: Tue, 23 Dec 2014 23:52:13 +0100
Date: 2014-12-23T23:52:13+01:00	[thread overview]
Message-ID: <m7crm7$r9h$1@dont-email.me> (raw)
In-Reply-To: <14woqdx7yg0ry.eghy2k6aafqc.dlg@40tude.net>

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


  reply	other threads:[~2014-12-23 22:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-23 21:21 Duration for GNAT on ARM Simon Wright
2014-12-23 22:42 ` Dmitry A. Kazakov
2014-12-23 22:52   ` J-P. Rosen [this message]
2014-12-24  0:27     ` Simon Wright
2014-12-24  9:40       ` Simon Wright
2014-12-24  0:04   ` Simon Wright
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox