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,832f7594a9660d69 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!204.127.204.223.MISMATCH!wns13feed!worldnet.att.net!attbi_s71.POSTED!53ab2750!not-for-mail From: "Jeffrey R. Carter" Organization: jrcarter at acm dot org User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada.Real_Time Vs. Ada.Calendar References: <1164209051.002619.21380@m73g2000cwd.googlegroups.com> In-Reply-To: <1164209051.002619.21380@m73g2000cwd.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 12.201.97.213 X-Complaints-To: abuse@mchsi.com X-Trace: attbi_s71 1164214931 12.201.97.213 (Wed, 22 Nov 2006 17:02:11 GMT) NNTP-Posting-Date: Wed, 22 Nov 2006 17:02:11 GMT Date: Wed, 22 Nov 2006 17:02:11 GMT Xref: g2news2.google.com comp.lang.ada:7649 Date: 2006-11-22T17:02:11+00:00 List-Id: markp wrote: > I need to compare data types that are stored in Ada.Real_Time.Time and > Ada.Calendar.Time. I know I can get a seconds count from each package. > However, is it the same time base? Is it dependant on the hardware it > is run on? In general, you can't count on them having any meaningful relationship. Real_Time may be a count of ticks since the program started, for example, while Calendar must be a date and time CE. How they are implemented is not specified, which is not surprising. For a specific compiler and platform, you may be able to make use of compiler-dependent information to relate the two. GNAT, for example, defines both Time types as "new Duration". That doesn't guarantee that the stored values have the same meaning, though. -- Jeff Carter "We burst our pimples at you." Monty Python & the Holy Grail 16