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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: Emanuel Berg Newsgroups: comp.lang.ada Subject: Re: how to analyze clock drift Date: Thu, 20 Nov 2014 21:41:41 +0100 Organization: Aioe.org NNTP Server Message-ID: <87fvdd38qi.fsf@debian.uxu> References: <6uun6alsp3jh1pob6g9qgcg85etqgenmd0@4ax.com> <87zjbn3nss.fsf@debian.uxu> <1nvfhit2csxr5.41v36jksch28$.dlg@40tude.net> <87k32qet5y.fsf@debian.uxu> <188uppnlnvqgq$.1kjz3jnhjxqji.dlg@40tude.net> NNTP-Posting-Host: feB02bRejf23rfBm51Mt7Q.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:vRDuzq/s0mlQPv84tp2c3vHcpcM= Mail-Copies-To: never Xref: news.eternal-september.org comp.lang.ada:23573 Date: 2014-11-20T21:41:41+01:00 List-Id: "Dmitry A. Kazakov" writes: > Yes, that is when you already know the expected > time. I assumed that the reference clock and the > clock used in wait are different clocks, deviating > at constant speed. Yes, I should have told you. The data I posted yesterday from the Lisp program - the first trace are the measured tick times in nanoseconds, and the intended tick is *1 ms*. The outputs are by doing the suggested: offset = time1 - time2 - DESIRED_TICK (I wonder if I made a mistake here - I assume I should put DESIRED_TICK in nanos as well? - and I don't remember doing that.) Anyway if this method is good, can I make any conclusions from the data? For example, how big a mean would be considered a big drift, how big a deviation an uneven drift, and so on? Here is the original data again: For these clock ticks (in nanoseconds): 85033108461718 85033109544537 85033110621490 85033111714366 85033112794112 85033113871903 85033114934049 85033116009605 85033117089909 85033118169656 85033119256945 85033120336411 ... The output is: readings: 543 mean: 1076366.000000 variance: 14127140.000000 standard deviation: 3758.608785 min: 1062145 max: 1096507 1082818 1076952 1092875 1079745 1077790 1062145 1075555 1080303 1079746 1087288 1079465 1072762 ... -- underground experts united