comp.lang.ada
 help / color / mirror / Atom feed
From: "Marc A. Criley" <marc.a.criley@lmco.com>
Subject: Re: Passing Time via RCI
Date: 1998/02/03
Date: 1998-02-03T00:00:00+00:00	[thread overview]
Message-ID: <34D70B78.6503@lmco.com> (raw)
In-Reply-To: m3zpka7xx2.fsf@localhost.localdomain


Samuel Tardieu wrote:
> 
> >>>>> "Marc" == Marc A Criley <marc.a.criley@lmco.com> writes:
> 
> Marc> Do I have to define my own time type?  And write my own time
> Marc> utilities?  Or do an Unchecked_Conversion from Time to some byte
> Marc> array I define, pass it, then convert it back?
> 
> That's a bad idea to do an unchecked conversion to an array of bytes,
> since it won't work in heterogeneous environments (bytes won't get
> swapped in the case of an array, while they should if they represent a
> time). You should probably define your own time type.

Yeah, Unchecked_Conversion is way down on my list of palatable
solutions, though the network on which it'd be used is homogeneous.
It just strikes me as almost an oversight that I have all these Time
oriented utilities and I can't simply use them because there's no
straightforward way to pass time around.  Another option I've got
is to Split the time, type convert the Year, Month, etc into my
own types, pass these, convert them back to Calendar.Year, etc.,
and use Time_Of to rebuild the time.  And still...

> Marc> This seems, uh, silly.  What am I missing?
> 
> You don't transmit pointers accross partitions, because a pointer has
> no meaning in a different address space. You should consider that the
> same thing happens with absolute times (distributed time is a
> well-known concept). You can still transmit durations though.

With this system, a single process is the master timekeeper and all
other processes are syncing off it.  (Yes, I know about propagation
delays, in this system the time resolution requirements are coarse
enough that it's not an issue.)

I'd thought about using Duration as an offset to a base time, but
I _still_ have to get the base time across, for display purposes.

> 
>   Sam
> - - --
> Samuel Tardieu -- sam@ada.eu.org

-- 
Marc A. Criley
Chief Software Architect
Lockheed Martin ATWCS
marc.a.criley@lmco.com
(610) 354-7861




  reply	other threads:[~1998-02-03  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-02-02  0:00 Passing Time via RCI Marc A. Criley
1998-02-02  0:00 ` Samuel Tardieu
1998-02-03  0:00   ` Marc A. Criley [this message]
1998-02-03  0:00     ` Martin M Dowie
1998-02-04  0:00     ` Jean-Pierre Rosen
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox