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,9201003129b5431b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-09-04 14:51:56 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!paloalto-snf1.gtei.net!paloalto-snh1.gtei.net!news.gtei.net!newsfeed.direct.ca!look.ca!newshub2.rdc1.sfba.home.com!news.home.com!news1.rdc1.sfba.home.com.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: need ada timer routine References: <3B9533B8.6EC1E11B@worldnet.att.net> X-Newsreader: Tom's custom newsreader Message-ID: <02cl7.47769$sa.27553850@news1.rdc1.sfba.home.com> Date: Tue, 04 Sep 2001 21:51:56 GMT NNTP-Posting-Host: 24.7.82.199 X-Complaints-To: abuse@home.net X-Trace: news1.rdc1.sfba.home.com 999640316 24.7.82.199 (Tue, 04 Sep 2001 14:51:56 PDT) NNTP-Posting-Date: Tue, 04 Sep 2001 14:51:56 PDT Organization: Excite@Home - The Leader in Broadband http://home.com/faster Xref: archiver1.google.com comp.lang.ada:12726 Date: 2001-09-04T21:51:56+00:00 List-Id: > If you want to reliably send data every 50 milliseconds you want > to use a task with a "delay until" statement in a loop. Assuming of course that the OS and the compiler's RTS and the hardware talk accurately about 50 ms. For instance, in old DOS/Windows stuff the clock only ticked every 55 ms so that was the shortest possible delay on simpleminded systems. You might want to compile and run my "time the clock" routine (www.adapower.com) on your system to see just what's what. If necessary, you can always get weird and do things like plaing a 50 ms sound file and depending essentially on the interrupt at the end to wake your routine. > > For my Visual C I did "m_timer = SetTimer(1, 50, NULL);" This now calls a > > built in API OnTimer(UINT nIDEvent) every 50 millisec. Need something like The same thing of course applies here. Just because a parameter is specified as "milliseconds" doesn't necessarily mean the OS actually pays attention.