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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.52.28.5 with SMTP id x5mr48391202vdg.3.1438269690561; Thu, 30 Jul 2015 08:21:30 -0700 (PDT) X-Received: by 10.140.81.38 with SMTP id e35mr176262qgd.3.1438269690542; Thu, 30 Jul 2015 08:21:30 -0700 (PDT) Path: buffer1.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!69no2834285qgl.1!news-out.google.com!78ni151qge.1!nntp.google.com!69no2834280qgl.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 30 Jul 2015 08:21:30 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=81.203.145.32; posting-account=AFCLjAoAAABJAOf_HjgEEEi3ty-lG5m2 NNTP-Posting-Host: 81.203.145.32 References: <2df4698f-4c8e-457c-822d-209cb2f8ab5e@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Running a preprocessor from GPS? From: EGarrulo Injection-Date: Thu, 30 Jul 2015 15:21:30 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: number.nntp.giganews.com comp.lang.ada:194525 Date: 2015-07-30T08:21:30-07:00 List-Id: On Thursday, July 30, 2015 at 5:13:18 PM UTC+2, EGarrulo wrote: > KISS solution: > > TickCount := (if System.FreeRTOS.Tasks.In_ISR > then xTaskGetTickCountFromISR > else xTaskGetTickCount) > return Tick * Time_Base (TickCount); > > > I think that the latter form is more > readable. Wait! It seems more a problem of formatting. This looks the best: TickCount := (if System.FreeRTOS.Tasks.In_ISR then xTaskGetTickCountFromISR else xTaskGetTickCount); And it would work well with the original solution, too: return Tick * Time_Base (if System.FreeRTOS.Tasks.In_ISR then xTaskGetTickCountFromISR else xTaskGetTickCount);