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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5d33a98bc01d956f X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-01-26 14:27:13 PST Path: supernews.google.com!sn-xit-02!sn-xit-01!supernews.com!newsfeed.stanford.edu!news.tele.dk!193.251.151.101!opentransit.net!wanadoo.fr!not-for-mail From: Pascal Obry Newsgroups: comp.lang.ada Subject: Re: Clock drift in gnat 3.13p on Windows Date: 26 Jan 2001 23:24:40 +0100 Organization: Home - http://perso.wanadoo.fr/pascal.obry Message-ID: References: NNTP-Posting-Host: mix-velizy-107-4-37.abo.wanadoo.fr X-Trace: wanadoo.fr 980548030 15610 193.249.47.37 (26 Jan 2001 22:27:10 GMT) X-Complaints-To: abuse@wanadoo.fr NNTP-Posting-Date: 26 Jan 2001 22:27:10 GMT X-Newsreader: Gnus v5.7/Emacs 20.7 Xref: supernews.google.com comp.lang.ada:4585 Date: 2001-01-26T22:27:10+00:00 List-Id: cts@kampong.aedinc.net ((null)) writes: > I have an Ada application compiled with gnat 3.13p. It runs on NT > or Windows 2000 PC that gets periodic clock updates via NTP. > > When the program first starts up Ada.Calendar.Clock, Ada.Real_Time.Clock > and Win32.Winbase.GetLocalTime all agree on the time. After the > program has run for a few hours and the PC has gotten a few NTP > time updates, GNAT's idea of the current time is off by a second > or two. Well GNAT is using the High Performance Counter under NT to achieve high resolution but this counter is certainly not updated by NTP updates... > I'd like to periodically update the GNAT runtime system's idea of > the current time. Would it be sufficient to periodically adjust > the value of Base_Clock and Base_Ticks in System.OS_Primitives? Well, looking at the implementation it should work :) But you'll have to break the encapsulation of Base_Clock... Pascal. -- --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://perso.wanadoo.fr/pascal.obry --| --| "The best way to travel is by means of imagination"