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-19 05:37:30 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!130.133.1.3!fu-berlin.de!uni-berlin.de!tar-alcarin.cbb-automation.DE!not-for-mail From: dmitry@elros.cbb-automation.de (Dmitry A. Kazakov) Newsgroups: comp.lang.ada Subject: Re: FILETIME <-> Ada.Real_Time.Time conversions Date: Wed, 19 Dec 2001 13:37:28 GMT Message-ID: <3c208dc5.16968437@News.CIS.DFN.DE> References: <3c1f3917.16015859@News.CIS.DFN.DE> <3C2057AF.323DFF5C@icn.siemens.de> NNTP-Posting-Host: tar-alcarin.cbb-automation.de (212.79.194.111) X-Trace: fu-berlin.de 1008769049 17805053 212.79.194.111 (16 [77047]) X-Newsreader: Forte Free Agent 1.21/32.243 Xref: archiver1.google.com comp.lang.ada:18091 Date: 2001-12-19T13:37:28+00:00 List-Id: On Wed, 19 Dec 2001 10:02:39 +0100, Alfred Hilscher wrote: >On WinXX I would first convert FileTime to SystemTime (which is more >appropriate). > >BOOL FileTimeToSystemTime( > > CONST FILETIME * lpFileTime, // pointer to file time to convert > LPSYSTEMTIME lpSystemTime // pointer to structure to receive >system time > ); Actually FILETIME [UTC] format is used in a communication protocol to represent time-stamps. Win32 SYSTEMTIME is rougly same though with great precision loss, because its resolution is 1ms. It seems that under Win32 there is no way to convert FILETIME to the high-resolution monotonic time (performance counters) . Therefore a complicated statistical algorithm was implemented to convert FILETIME to performance counters (in C++). This way is well possible, but time consuming, unreliable and of course depends on Win32 API. Presently parts of the system are under implementation in Ada 95 *not* under Win32. There is no designated platform. It should be portable. So the question reappears. It is relatively easy to convert FILETIME to Ada.Calendar.Time provided that Ada.Calendar.Split and Time_Of are dealing with UTC [??]. Yet there is a hint in Ada Rationale that Ada.Calendar.Time might suffer jumps because of daylight savings [shudder]. At the same time, it seems that Ada.Real_Time.Time was very carefully designed to prevent any attempt to correlate it with any external clock [??]. So the problem. Regards, Dmitry Kazakov