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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.236.118.12 with SMTP id k12mr5081009yhh.35.1391814680561; Fri, 07 Feb 2014 15:11:20 -0800 (PST) X-Received: by 10.140.43.227 with SMTP id e90mr348338qga.4.1391814680542; Fri, 07 Feb 2014 15:11:20 -0800 (PST) Path: border1.nntp.dca3.giganews.com!backlog4.nntp.dca3.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news.glorb.com!f11no13571603qae.1!news-out.google.com!y18ni5935qap.1!nntp.google.com!k15no13551317qaq.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 7 Feb 2014 15:11:20 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=179.98.198.87; posting-account=TRgI1QoAAABSsYi-ox3Pi6N-JEKKU0cu NNTP-Posting-Host: 179.98.198.87 References: <5e8fad3a-94e6-4517-af54-db8b4146803e@googlegroups.com> <858uto3cj3.fsf@stephe-leake.org> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <708ef9e4-b6a3-488b-a86d-b70c7de43ac2@googlegroups.com> Subject: Re: Raspberry Pi, Real-Time and Ada From: "Rego, P." Injection-Date: Fri, 07 Feb 2014 23:11:20 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Original-Bytes: 2741 Xref: number.nntp.dca.giganews.com comp.lang.ada:184714 Date: 2014-02-07T15:11:20-08:00 List-Id: > I don't think that 10ms would be a problem even for ARM. > On an Intel board 200=B5s loops (read inputs, calculate, write outputs) a= re > doable. > Ada has everything you need for that. > The main problem is how good the RT clock is. Windows and VxWorks typical= ly > have miserable RT clock services on x86. x86 Linux has a decent one. > Regarding ARM Linux, I didn't tested its clock, so I cannot tell. The > primary test is to call Ada.Real_Time.Clock twice and to compare if the > reading is same. If they are you should look for an alternative > implementation of.=20 BTW, now I have done a fast test using=20 with Ada.Real_Time; use Ada.Real_Time; with Ada.Text_IO; procedure My_Clock is First_Time : Time; Second_Time : Time; F_Duration : Time_Span; Time_Duration : Duration; begin First_Time :=3D Ada.Real_Time.Clock; Second_Time :=3D Ada.Real_Time.Clock; F_Duration :=3D Second_Time - First_Time; Time_Duration :=3D To_Duration (F_Duration); Ada.Text_IO.Put_Line (Duration'Image (Time_Duration)); =20 end My_Clock; and the result was in average 17us for the RPi (with Raspbian without the p= reemptive patch), with a variation of 1 us (for just a few executions), whi= le the same code running on a Windows 7x64 machine was sometimes 0, sometim= es 366ns (49 times faster).