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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f3f07e9e53bcc4f6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-12-21 08:26:30 PST Path: archiver1.google.com!news2.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!wn1feed!wn2feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!rwcrnsc52.POSTED!not-for-mail From: "Steve Doiel" Newsgroups: comp.lang.ada References: <3c1f3917.16015859@News.CIS.DFN.DE> <3C2057AF.323DFF5C@icn.siemens.de> <3c208dc5.16968437@News.CIS.DFN.DE> <3c21f386.108560406@News.CIS.DFN.DE> <3c22f845.175317718@News.CIS.DFN.DE> Subject: Re: FILETIME <-> Ada.Real_Time.Time conversions X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: <2hJU7.19199$Ah.629569@rwcrnsc52> NNTP-Posting-Host: zaJU7-192621-Ah-629547@rwcrnsc52 X-Complaints-To: abuse@attbi.com X-Trace: rwcrnsc52 1008951486 zaJU7-192621-Ah-629547@rwcrnsc52 (Fri, 21 Dec 2001 16:18:06 GMT) NNTP-Posting-Date: Fri, 21 Dec 2001 16:18:06 GMT Organization: AT&T Broadband Date: Fri, 21 Dec 2001 16:18:06 GMT Xref: archiver1.google.com comp.lang.ada:18209 Date: 2001-12-21T16:18:06+00:00 List-Id: > >You can determine the Real_Time.Time value for your epoch using > >Ada.Calendar.Time_Of. I'll call this real_time_epoch. > > How do I convert Ada.Calendar.Time to Ada.Real_Time.Time? > In LRM D.8.18 (Ada.Real_Time) the definition of the type Time refers to 9.6 (Ada.Calendar). I'm not sure whether this means that values of the two Time values correlate, but the first time I read the clause I thought it did. I know you cannot directly convert from one to the other, but you may be able to use Unchecked_Conversion. Perhaps a language lawyer could provide a better answer here? SteveD > >To obtain a Real_Time.Time value from a subsequent FILETIME values use: > > > > real_time_value := real_time_epoch > > + Ada.Real_Time.Nanoseconds( Integer( > >file_time_value - file_time_epoch ) ); > > > >I'm sure you'll have to mess with the types to get things working, but I > >think this will get you there. > > Regards, > Dmitry Kazakov