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,MAILING_LIST_MULTI, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ffa5a82d3c57141e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-12-12 07:41:04 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.ems.psu.edu!news.cis.ohio-state.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news.algonet.se!algonet!news.tele.dk!news.tele.dk!small.news.tele.dk!fr.usenet-edu.net!usenet-edu.net!enst.fr!not-for-mail From: Toshitaka Kumano Newsgroups: comp.lang.ada Subject: Re: Help - time to string query Date: Fri, 13 Dec 2002 00:42:05 +0900 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: References: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: avanie.enst.fr 1039707663 21692 137.194.161.2 (12 Dec 2002 15:41:03 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Thu, 12 Dec 2002 15:41:03 +0000 (UTC) Return-Path: X-Mailer: Mozilla 4.78 [ja] (Win98; U) X-Accept-Language: en-US,en,ja Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.13 Precedence: bulk List-Unsubscribe: , List-Id: comp.lang.ada mail<->news gateway List-Post: List-Help: List-Subscribe: , Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:31743 Date: 2002-12-13T00:42:05+09:00 SteveD wrote: > Float_Text_Io.Put( Float( Ada.Real_Time.To_Duration( end_Time - > Start_TIme ) ), 3, 5, 0 ); > Text_Io.New_Line; OR simply, ... use Ada.Real_Time; Text_IO.Put_Line (Duration'Image (To_Duration (end_Time - Start_TIme))); -- If converting to float, you might lose precision. OR if you prefer somewhat "current" time than relative time_span, ... use Ada.Real_Time; Text_IO.Put_Line (Duration'Image (To_Duration (Clock - Time_First))); -- This shows total time_span since "epoch". -- In this case, because the time_span value may be rather large, -- in some compilers (e.g. GNAT), you may lose precision in Duration'Image(). -- Toshitaka Kumano Kamakura, Japan