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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,75c440b4b7ed5f91 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!y27g2000pre.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Real Time IO routines Date: Fri, 26 Oct 2007 15:34:24 -0700 Organization: http://groups.google.com Message-ID: <1193438064.975702.104100@y27g2000pre.googlegroups.com> References: <1193410739.367181.96050@50g2000hsm.googlegroups.com> <1193416987.425545.80810@v29g2000prd.googlegroups.com> <1193417619.216687.95600@v3g2000hsg.googlegroups.com> <1193418278.033289.106280@y27g2000pre.googlegroups.com> <1193419270.872928.86840@57g2000hsv.googlegroups.com> <873avxg1uv.fsf@ludovic-brenta.org> <1193428813.533744.163870@o80g2000hse.googlegroups.com> <16o6lua8t1589.7jh7lsdh2d8i$.dlg@40tude.net> <1193433267.671789.134690@50g2000hsm.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: posting.google.com 1193438065 30141 127.0.0.1 (26 Oct 2007 22:34:25 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 26 Oct 2007 22:34:25 +0000 (UTC) In-Reply-To: <1193433267.671789.134690@50g2000hsm.googlegroups.com> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: y27g2000pre.googlegroups.com; posting-host=66.126.103.122; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0 Xref: g2news2.google.com comp.lang.ada:2599 Date: 2007-10-26T15:34:24-07:00 List-Id: On Oct 26, 2:14 pm, andrew wrote: > Something seems to be wrong though. In my program I am basiclly > doing: > > start := clock; > --I run my algorithm here > finish := clock; > ada.Text_IO.put_line("time = " & duration'image(to_duration(finish - > start))); > > the output is always time = 0.000000000. I know it had to take some > time because it takes about 10 seconds for the program to reach that > point in the code. Overflow maybe? The RM says that "Time" is supposed to be able to represent a value, from program start, of at least 50 years. So if a 10-second program is overflowing that time, you've got a problem. I tried a program similar to the above on two different compilers, with "delay 10.0" in the place where you have "I run my algorithm here"; and in both cases the output is around 10.0. I don't know why you'd be seeing zero, assuming the system you're on has a working clock. What type of machine are you running on, and what compiler? -- Adam