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,b1850e397df49d95 X-Google-Attributes: gid103376,public From: Eric Miller Subject: Re: How to convert an Fixed_Point to to an Integer ? Date: 1996/12/23 Message-ID: <32BF1291.7A8B@tiac.net>#1/1 X-Deja-AN: 205656979 references: <01bbf058$cbdbf980$LocalHost@jerryware> content-type: text/plain; charset=us-ascii organization: The Internet Access Company, Inc. mime-version: 1.0 newsgroups: comp.lang.ada x-mailer: Mozilla 3.0 (Win16; I) Date: 1996-12-23T00:00:00+00:00 List-Id: Jerry van Dijk wrote: > The question really is: how do I convert an Ada.Calendar.Time (ie a > Duration, ie a > ordinary fixed_point type) to an Integer representing the nearest number of > seconds. Well, first you have to ask the question "seconds since when?" If the answer is "since the beginning of the day," you can use a call to Ada.Calendar.Seconds and convert that to an integer. If it's since some other date, you'll need to call Ada.Calendar.Day, .Month, and .Year and do some multiplication. Cheers, Eric