From: dmitry@elros.cbb-automation.de (Dmitry A. Kazakov)
Subject: Re: FILETIME <-> Ada.Real_Time.Time conversions
Date: Wed, 19 Dec 2001 13:37:28 GMT
Date: 2001-12-19T13:37:28+00:00 [thread overview]
Message-ID: <3c208dc5.16968437@News.CIS.DFN.DE> (raw)
In-Reply-To: 3C2057AF.323DFF5C@icn.siemens.de
On Wed, 19 Dec 2001 10:02:39 +0100, Alfred Hilscher
<Alfred.Hilscher@icn.siemens.de> 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
next prev parent reply other threads:[~2001-12-19 13:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-18 12:53 FILETIME <-> Ada.Real_Time.Time conversions Dmitry A. Kazakov
2001-12-19 9:02 ` Alfred Hilscher
2001-12-19 13:37 ` Dmitry A. Kazakov [this message]
2001-12-19 15:06 ` Steve Doiel
2001-12-20 11:27 ` M. A. Alves
2001-12-20 15:10 ` Dmitry A. Kazakov
2001-12-21 3:13 ` Steve Doiel
2001-12-21 10:26 ` Dmitry A. Kazakov
2001-12-21 16:18 ` Steve Doiel
2001-12-24 18:02 ` Dmitry A. Kazakov
2001-12-21 6:17 ` tmoran
2001-12-21 8:51 ` Dmitry A. Kazakov
2001-12-21 18:17 ` tmoran
2001-12-24 15:59 ` Dmitry A. Kazakov
2001-12-24 18:21 ` tmoran
2001-12-25 15:53 ` Dmitry A. Kazakov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox