comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Platform independent calendar
Date: Sun, 7 Dec 2008 20:15:37 +0100
Date: 2008-12-07T20:15:38+01:00	[thread overview]
Message-ID: <1j7ld9yumi0xz$.1pqqyelxn52df$.dlg@40tude.net> (raw)
In-Reply-To: hA2MJBH18+OJFwLn@ada-augusta.demon.co.uk

On Sun, 7 Dec 2008 15:43:49 +0000, Mike H wrote:

> I am working (solo) on a signalling related application for a UK 
> preserved railway. The system needs to be as near to totally platform 
> independent as possible. As I see it, this rules out use of package 
> Calendar.
> 
> Rather than re-invent a wheel, I would prefer to use a pre-existing 
> solution and would be grateful for suggestions.

Oh,well. This is a huge issue. We are developing a portable middleware in
Ada 2005 with the heterogeneous nodes synchronized over the network. For
that we need UTC time stamps.

Our investigation has shown that presently there is no way to make it. To
start with, Ada.Calendar is obviously unusable. You should always use
Ada.Real_Time. With the latter you should take care of clock resolution, it
is quite possible that it turns miserable, and you will need to attune the
OS and/or replace the standard Ada library, as we did. For each platform
write a clock test. Note that your workaround will likely depend on the
processor family. We must have written replacements for Pentium IV and PPC.
Further, Ada.Calendar.Time_Zones is ill-specified and thus unusable as
well. I posted a proposal to fix it to Ada comments, but for now you have
no better choice than to look into the implementation your compiler
provides and then to act accordingly.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  parent reply	other threads:[~2008-12-07 19:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-07 15:43 Platform independent calendar Mike H
2008-12-07 16:02 ` RasikaSrinivasan
2008-12-07 17:40   ` Mike H
2008-12-07 19:38     ` Gene
2008-12-07 17:14 ` Per Sandberg
2008-12-07 18:06   ` sjw
2008-12-07 19:15 ` Dmitry A. Kazakov [this message]
2008-12-07 22:26   ` Maciej Sobczak
2008-12-08  8:36     ` Dmitry A. Kazakov
2008-12-07 23:56 ` Jeffrey R. Carter
2008-12-08  0:15   ` Mike H
2008-12-08  2:04     ` Jeffrey R. Carter
2008-12-08 11:46       ` Mike H
2008-12-08  7:17   ` sjw
2008-12-08  8:46   ` 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