From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader02.eternal-september.org!aioe.org!0nYzhFpEeoH2MFWixtUlcg.user.gioia.aioe.org.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Ada.Real_Time.Time_First Date: Wed, 09 Dec 2020 20:07:32 +0000 Organization: Aioe.org NNTP Server Message-ID: References: NNTP-Posting-Host: 0nYzhFpEeoH2MFWixtUlcg.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (darwin) X-Notice: Filtered by postfilter v. 0.9.2 Cancel-Lock: sha1:ThXZSVjRV2Wgy5oCc3TdX35YU4k= Xref: reader02.eternal-september.org comp.lang.ada:60773 List-Id: "Dmitry A. Kazakov" writes: > I would use Next_Time instead of Last_Time: > > Next_Flight_Command_Time : Time := Time_First; > begin > loop > Now := Clock; > if Now >= Next_Flight_Command_Time then > Fire_All_Rockets; > Next_Flight_Command_Time := > Great idea; the name isn't right in my context, but the method applies very well. (It's the time by which the next flight command has to have been given before we decide we're not flying any more. I plead that (a) this logic seems not to be our Earth logic, (b) it's a translation from someone's C, (c) the original code has a comment expressing doubt)