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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,8da181ade72859cf X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit From: Brian May Newsgroups: comp.lang.ada Subject: Re: timeouts References: Date: Sun, 22 Aug 2004 14:25:59 +1000 Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:I7JKMlrrSHOTFbJmn/yWE9p6Tzw= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: dsl-202-173-153-89.vic.westnet.com.au X-Trace: news.melbourne.pipenetworks.com 1093148758 202.173.153.89 (22 Aug 2004 14:25:58 +1000) X-Complaints-To: abuse@pipenetworks.com X-Abuse-Info: Please forward all headers to enable your complaint to be properly processed. Path: g2news1.google.com!news2.google.com!news.maxwell.syr.edu!news.mel.connect.com.au!news.alphalink.com.au!news.melbourne.pipenetworks.com!not-for-mail Xref: g2news1.google.com comp.lang.ada:2919 Date: 2004-08-22T14:25:59+10:00 List-Id: >>>>> "Jeffrey" == Jeffrey Carter writes: Jeffrey> The fact that the logged times decrease seems to indicate that the Jeffrey> logging package is doing something funny. Nothing that I can see: function Strip(Value : in String) return String is I : Natural := Value'First; Continue : Boolean := True; begin while I <= Value'Last and Continue loop if Value(I) = ' ' then I := I + 1; else Continue := False; end if; end loop; return Value(I..Value'Last); end Strip; function To_String(The_Time : in Time) return String is Duration : Integer; H : Integer range 0..23; M : Integer range 0..60; S : Integer range 0..60; begin Duration := Integer(Seconds(The_Time)); S := Duration mod 60; Duration := (Duration-S)/60; M := Duration mod 60; Duration := (Duration-M)/60; H := Duration mod 24; return Strip(Integer'Image(H))&":" &Strip(Integer'Image(M))&":" &Strip(Integer'Image(S)); end To_String; procedure Message(Module : in Module_Type; Level : in Level_Type; Text : in String) is begin if Display(Module,Level) then Put_Line(To_String(Clock)&" " &Module_Type'Image(Module)&" " &Level_Type'Image(Level)&" " &Text); end if; end Message; Sure, the Duration := Integer(...) line may round the time up (according to info I got in another thread), but I still fail to see why a later log message should log an earlier time. -- Brian May