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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a0fe76afdfe9e57d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-11 20:06:19 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newshub.sdsu.edu!elnk-pas-nf2!newsfeed.earthlink.net!wn14feed!wn13feed!wn12feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!sccrnsc03.POSTED!not-for-mail From: "Steve" Newsgroups: comp.lang.ada References: Subject: Re: milliseconds and delay until X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Message-ID: NNTP-Posting-Host: 12.211.13.75 X-Complaints-To: abuse@attbi.com X-Trace: sccrnsc03 1055387179 12.211.13.75 (Thu, 12 Jun 2003 03:06:19 GMT) NNTP-Posting-Date: Thu, 12 Jun 2003 03:06:19 GMT Organization: AT&T Broadband Date: Thu, 12 Jun 2003 03:06:19 GMT Xref: archiver1.google.com comp.lang.ada:39021 Date: 2003-06-12T03:06:19+00:00 List-Id: Instead of using Ada.Calendar, have a look at Ada.Real_Time; Then you should be able to do something like (tested): with Ada.Real_Time; procedure Rt_Demo is package Real_Time renames Ada.Real_Time; use type Real_Time.Time_Span; use type Real_Time.Time; Start_Time : Real_Time.Time; Target_Time : Real_Time.Time; begin Start_Time := Real_Time.Clock; Target_Time := Start_Time + Real_Time.Milliseconds( 100 ); delay until Target_Time; end Rt_Demo; My rule of thumb on deciding whether to use Ada.Calendar versus Ada.Real_Time is: Use Ada.Calendar when you want numbers to print on a report. Use Ada.Real_Time when you want to do delays for timing. Most of the work I do is time sensitive, where delays of more than a few tens of milliseconds are not tolerated for some operation. I use Ada.Real_Time most of the time. Steve (The Duck) "Thomas Bruns" wrote in message news:bc7smt$357$04$1@news.t-online.com... > Hello > > how can I handle the until delay statement, too do this: ???? > > > with ADA.Calendar; use ADA.Calendar; > > procedure .... > > MS : INTEGER; --milliseconds > > begin > MS:= INTEGER(FLOAT(seconds(clock)) * 1000); > > MS := MS + 100; > > delay until MS; ---???? it is wrong :-( it must be a time type :-( but I > -- need the clock from a fixed time and add some milliseconds... > --and then the until delay statement....How can I handle this??? > > end; > > > -- > PS: > HW: ASUS P4PE, PIV 2.4 GHz, 768 MB RAM, Geforce 4200, > SW: Suse 8.2, Kernel 2.4.20, KDE 3.1.2, QT3.1.2, KDEVELOP 2.1.5