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=0.6 required=5.0 tests=BAYES_00,TO_NO_BRKTS_FROM_MSSP autolearn=no 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 13:24:11 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!feed.textport.net!newsranger.com!www.newsranger.com!not-for-mail Newsgroups: comp.lang.ada From: Ted Dennison References: <9n2rbg$4qj$1@zeus.orl.lmco.com> Subject: Re: need ada timer routine Message-ID: X-Abuse-Info: When contacting newsranger.com regarding abuse please X-Abuse-Info: forward the entire news article including headers or X-Abuse-Info: else we will not be able to process your request X-Complaints-To: abuse@newsranger.com NNTP-Posting-Date: Tue, 04 Sep 2001 16:24:04 EDT Organization: http://www.newsranger.com Date: Tue, 04 Sep 2001 20:24:04 GMT Xref: archiver1.google.com comp.lang.ada:12720 Date: 2001-09-04T20:24:04+00:00 List-Id: In article <9n2rbg$4qj$1@zeus.orl.lmco.com>, mop says... >i need a routine to pass serial data at a 20 hertz rate > >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 >this in Ada. The Right Way to do this kind of thing in Ada is to create a task that gets the time, then repeatedly adds 50 ms to it and does a "delay until" on the result. Out of curiosity, is this for a class at UCF? I got my master's from there, but they didn't do a lot of Ada at the time. I tried to convince one prof to move his OS course from concurrent C to Ada (the only platform Concurrent C supported was an obsolete SunOS box kept for just that purpose), but I don't think I had much success. --- T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html home email - mailto:dennison@telepath.com