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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,30bb735cf84485f7 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!postnews.google.com!a1g2000hsb.googlegroups.com!not-for-mail From: george.priv@gmail.com Newsgroups: comp.lang.ada Subject: Re: delay until problem in Windows Date: Sun, 6 Apr 2008 20:10:38 -0700 (PDT) Organization: http://groups.google.com Message-ID: <9bfa59b1-c5ef-42ee-9d2a-729d215293a3@a1g2000hsb.googlegroups.com> References: NNTP-Posting-Host: 151.196.71.114 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1207537838 27797 127.0.0.1 (7 Apr 2008 03:10:38 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 7 Apr 2008 03:10:38 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: a1g2000hsb.googlegroups.com; posting-host=151.196.71.114; posting-account=VnNb3AoAAACTpRtCcTrcjmPX7cs92k1Q User-Agent: G2/1.0 X-HTTP-Via: 1.1 SPARKS X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:20856 Date: 2008-04-06T20:10:38-07:00 List-Id: On Apr 5, 6:51 pm, george.p...@gmail.com wrote: Little update on the issue. The following program was created to reproduce the problem: with Ada.Calendar; use Ada.Calendar; with Ada.Text_IO; use Ada.Text_IO; with Ada.Calendar.Formatting; use Ada.Calendar.Formatting; procedure Delay_Test is Start_Time : Time := Clock; Time_Failed : Time := Start_Time; -- Time of first failure encountered task Delay_Test_Tsk is entry Term; end Delay_Test_Tsk; task body Delay_Test_Tsk is DT : constant Duration := 10.0; -- Desired Delta T Time_For_Next : Time := Clock + DT; -- Next cycle Last : Time := Clock; -- Last cycle clocked Fail_Count : Natural := 0; begin while Fail_Count < 5 loop select accept Term; exit; or delay until Time_For_Next; declare Actual_Delta : Duration := Clock - Last; begin Last := Clock; Time_For_Next := Last + DT; Put_Line("Actual Delay: " & Duration'Image(Actual_Delta) & ", Running (h):" & Duration'Image((Clock - Start_Time)/3600.0)); if Actual_Delta < DT then if Fail_Count = 0 then Time_Failed := Clock; end if; Fail_Count := Fail_Count + 1; else Fail_Count := 0; end if; end; end select; end loop; Put_Line("Started at:" & Image(Start_Time)); if Time_Failed /= Start_Time then Put_Line("Failed at :" & Image(Time_Failed)); Put_Line("Failed after :" & Duration'Image(Time_Failed - Start_Time)); end if; end Delay_Test_Tsk; Line : String (1 .. 80); Last : Natural; begin loop Get_Line(Line, Last); exit when Line(1) = 'q' or Line(1) = 'Q'; end loop; Delay_Test_Tsk.Term; end Delay_Test; Results vary from Windows flavors and I am not sure also that it is not related to a particular hardware. So far it is fine on Vista (after 22 hours) and XP (10 Hours). It failed on Server 2003 after 12 hours see output: Actual Delay: 10.000372615, Running (h): 11.836564300 Actual Delay: 10.000381345, Running (h): 11.839342185 Actual Delay: 10.000370677, Running (h): 11.842120066 Actual Delay: 10.000379534, Running (h): 11.844897949 Actual Delay: 10.000372998, Running (h): 11.847675831 Actual Delay: 10.000545537, Running (h): 11.850453761 Actual Delay: 7.984454967, Running (h): 11.852675966 Actual Delay: 7.984806621, Running (h): 11.854893969 Actual Delay: 7.984636928, Running (h): 11.857111924 Actual Delay: 7.984678819, Running (h): 11.859329891 Actual Delay: 7.984673656, Running (h): 11.861547856 Started at:2008-04-06 07:14:09 Failed at :2008-04-06 19:05:18 Failed after : 42669.633539129 If anyone would like to check their systems and let us know?