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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no 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!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: accuracy Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH 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> Date: Sun, 11 Mar 2007 16:50:14 +0100 Message-ID: NNTP-Posting-Date: 11 Mar 2007 16:49:55 CET NNTP-Posting-Host: e89b6589.newsspool4.arcor-online.net X-Trace: DXC=GV=TSJcYA^am7>ihJR;B_c4IUK On Sun, 11 Mar 2007 15:37:03 +0100, Pascal Obry wrote: > By checking a base time against GetSystemTimeAsFileTime to avoid using > another thread. This way you have the accuracy of the performance > counter and can adjust the current time if needed (DST, manual changes...). I.e. it does this only once. The potential problems with this is that: 1. The accuracy of GetSystemTimeAsFileTime is very low. 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. 4. It is unclear if the time source of the system time is derived from the performance counter. If not, they will divergent. A thread is used to accumulate measurements of performance counters and system time readings to get a best possible estimation out of it. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de