comp.lang.ada
 help / color / mirror / Atom feed
From: "Jerry van Dijk" <jvandyk@ibm.net>
Subject: Re: How to convert an Fixed_Point to to an Integer ?
Date: 1996/12/25
Date: 1996-12-25T00:00:00+00:00	[thread overview]
Message-ID: <01bbf24c$a8db4800$b72d5c8b@jerryware> (raw)
In-Reply-To: dewar.851441337@merv



Robert Dewar <dewar@merv.cs.nyu.edu> wrote in article
<dewar.851441337@merv>...

>   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.





  parent reply	other threads:[~1996-12-25  0:00 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-12-22  0:00 How to convert an Fixed_Point to to an Integer ? Jerry van Dijk
1996-12-23  0:00 ` Eric Miller
1996-12-23  0:00 ` Jerry van Dijk
1996-12-23  0:00 ` Larry Kilgallen
1996-12-23  0:00   ` Robert Dewar
1996-12-24  0:00     ` Jerry van Dijk
1996-12-24  0:00       ` Robert Dewar
1996-12-24  0:00         ` Norman H. Cohen
1996-12-24  0:00           ` Robert Dewar
1996-12-26  0:00             ` Keith Thompson
1996-12-26  0:00               ` Robert Dewar
1996-12-25  0:00         ` Jerry van Dijk [this message]
1996-12-25  0:00           ` Robert Dewar
1996-12-26  0:00             ` Norman H. Cohen
1996-12-27  0:00               ` Jerry van Dijk
1996-12-27  0:00                 ` Leap seconds in Unix time (was: Re: How to convert an Fixed_Point to to an Integer ?) Norman H. Cohen
1996-12-30  0:00               ` How to convert an Fixed_Point to to an Integer ? Mike Young
1996-12-30  0:00                 ` Michael F Brenner
1996-12-30  0:00                 ` 2000 is a leap year (was: How to convert an Fixed_Point to to an Inte) Larry Kilgallen
1996-12-31  0:00                 ` How to convert an Fixed_Point to to an Integer ? Keith Thompson
1997-01-02  0:00             ` 2000 is a leap year (was: How to convert an Fixed_Point to to an Inte) Mike Paley
1996-12-30  0:00 ` How to convert an Fixed_Point to to an Integer ? Steve Jones - JON
1996-12-30  0:00   ` Jacques Rouillard
1996-12-30  0:00 ` Steve Jones - JON
1996-12-30  0:00 ` Dave Barnes
replies disabled

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