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,e81fd3a32a1cacd2 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!aotearoa.belnet.be!news.belnet.be!nerim.net!proxad.net!exabot.com!freenix!news.wanadoo.fr!news.wanadoo.fr!not-for-mail Message-ID: <45F43EB2.2000008@obry.net> Date: Sun, 11 Mar 2007 18:38:58 +0100 From: Pascal Obry Organization: Home - http://www.obry.net User-Agent: Thunderbird 2.0b2 (Windows/20070116) MIME-Version: 1.0 Newsgroups: comp.lang.ada To: mailbox@dmitry-kazakov.de Subject: Re: accuracy References: <1170071840.010200.85210@s48g2000cws.googlegroups.com> <1173089302.125025.31370@t69g2000cwt.googlegroups.com> <0dmdnZIAd76ZpXPYnZ2dnUVZ_uCinZ2d@comcast.com> <1lq9zxgrnvfjx$.17ip3w3ei4xdb.dlg@40tude.net> <1lo7kf2cw2mog$.94hkrwmeyhqy.dlg@40tude.net> <45F40AE4.1070409@obry.net> <14hwwwwjy8mo$.nmkehs8w9zms$.dlg@40tude.net> <45F4140F.5000405@obry.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit NNTP-Posting-Date: 11 Mar 2007 18:39:00 CET NNTP-Posting-Host: 82.120.20.205 X-Trace: 1173634740 news.orange.fr 27396 82.120.20.205:4207 X-Complaints-To: abuse@orange.fr Xref: g2news1.google.com comp.lang.ada:14467 Date: 2007-03-11T18:39:00+01:00 List-Id: Dmitry, > I.e. it does this only once. The potential problems with this is that: No it is not does once but each time a clock is requested for adjustment if needed. > 1. The accuracy of GetSystemTimeAsFileTime is very low. Yes but it is not used for final clock returned value. > 2. All system calls have non-zero latencies. > > 3. There is a chance that the thread will be preempted between querying the > counter and calling to a system time query, which would additionally > increase the experienced latency up to milliseconds. During initialization of the runtime the performance counter and the system time are read until this is done during a minimal amount of time. This gives the base reference for the performance counter and the os time. > 4. It is unclear if the time source of the system time is derived from the > performance counter. If not, they will divergent. No it is no. If this is still unclear have a look at the corresponding implementation in the GNAT sources. Pascal. -- --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://www.obry.net --| "The best way to travel is by means of imagination" --| --| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595