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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,878f0988ded38f50 X-Google-Attributes: gid103376,public From: "Marc A. Criley" Subject: Re: Passing Time via RCI Date: 1998/02/03 Message-ID: <34D70B78.6503@lmco.com>#1/1 X-Deja-AN: 321652382 Content-Transfer-Encoding: 7bit References: <34D5D42A.35C7@lmco.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: Lockheed Martin M&DS Newsgroups: comp.lang.ada Date: 1998-02-03T00:00:00+00:00 List-Id: Samuel Tardieu wrote: > > >>>>> "Marc" == Marc A Criley 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