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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED.3d73Ybk3C5U4I2t8lv+lAQ.user.gioia.aioe.org!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Ada 95 Timers: Any Alternatives Available, Storage, Efficiency, Reliability, Accuracy, Et Cetera Issues? Date: Thu, 30 May 2019 18:20:25 +0200 Organization: Aioe.org NNTP Server Message-ID: References: NNTP-Posting-Host: 3d73Ybk3C5U4I2t8lv+lAQ.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 Content-Language: en-US X-Notice: Filtered by postfilter v. 0.9.2 Xref: reader01.eternal-september.org comp.lang.ada:56414 Date: 2019-05-30T18:20:25+02:00 List-Id: On 2019-05-30 17:34, Niklas Holsti wrote: > On 19-05-30 16:57 , Felix_The_Cat@gmail.com wrote: >> >> What are the limitations of the "with Timer;" in Ada 95? > > Not understood. There is no standard "package Timer" in Ada 95 (nor > other Ada standards, AFAIK). It looks that the OP meant Ada.Execution_Time.Timers. >> I want to simply do something in the Ada code when the timer >> counts down to 0. > > That sounds like some HW timer. Normally you would not use those > directly, but instead use the "delay" or "delay until" statements, to > wait until the actual time when something should be done, and let the > compiler and run-time system handle the HW timers. Right, alternatives could also be timed entry call (9.7.2) and delay alternative of selective accept (9.7.1). As for limitations of Ada.Execution_Time.Timers they are from the SW design POV. Scheduled actions usually interact with the program logic, the states of program objects, the context of the task performing these actions. Ada.Execution_Time.Timers are too low-level for a that. The intended use of Ada.Execution_Time.Timers is for something quite decoupled from the program itself, e.g. I can imagine a system health monitoring based on Ada.Execution_Time.Timers. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de