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=3.8 required=5.0 tests=BAYES_00,INVALID_MSGID, RATWARE_MS_HASH,RATWARE_OUTLOOK_NONAME autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b1850e397df49d95 X-Google-Attributes: gid103376,public From: "Jerry van Dijk" Subject: Re: How to convert an Fixed_Point to to an Integer ? Date: 1996/12/25 Message-ID: <01bbf24c$a8db4800$b72d5c8b@jerryware>#1/1 X-Deja-AN: 205889392 references: <01bbf058$cbdbf980$LocalHost@jerryware> <1996Dec23.072835.1@eisner> <01bbf179$0c4361e0$9b2d5c8b@jerryware> organization: *JerryWare HQ*, Haarlem, Holland newsgroups: comp.lang.ada Date: 1996-12-25T00:00:00+00:00 List-Id: Robert Dewar wrote in article ... > You are confused. The notion of time has nothing whatsoever to do > with the epoch which is a unix specific notion that might or might not > have something to do with the implementation of Time. Yes, you are right. To much Unix on the mind ? Anyway I think I an just going leave Calendar alone and simply use the C library function call. > The proper way to get the number of seconds from the epoch to now is > > Integer (Calendar.Clock - Epoch_Time); > > where Epoch_Time is a constant declared as something like > > Epoch_Time : constant Time := Calendar.Time_Of (1970,1,1,0.0); Yep, but I will await your reaction to Norman's comment first. > So I solved it by putting these conversion operation in a child of > Ada.Calender: > > YECH! A horrible solution, which is completely non-portable. I know, that's why I am looking for another solution. BTW do you know of plans to upgrade the POSIX spec to Ada95 ? > P.S. can you try to keep your lines to 80 chars, thanks Hmmm, I've set the line limit to 72... Thanks for your input! Jerry.