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,cae92f92d6a1d4b1 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Ada.Execution_Time Date: Tue, 28 Dec 2010 22:39:31 +0000 Organization: A noiseless patient Spider Message-ID: References: <6n1c5myuf2uz$.10jl3ln7il3aq.dlg@40tude.net> <8n0mgnFv2sU1@mid.individual.net> <1n3o55xjdjr9t.1u33kb75y2jfl$.dlg@40tude.net> <8n1142Fto2U1@mid.individual.net> <1o5cbm4b1l20d$.19winbma6k5qw.dlg@40tude.net> <8n4mskF7mmU1@mid.individual.net> <8nm30fF7r9U1@mid.individual.net> <1akm5muxu9zni.mu91b7pubqw0$.dlg@40tude.net> <8nrg25FoucU1@mid.individual.net> <2k07hwmh6123.1pgx57welw9of$.dlg@40tude.net> <8nsa76Fj4rU1@mid.individual.net> <1j9i6trxinqtg$.renlw9wdtpsf.dlg@40tude.net> <8nubhsF6e8U1@mid.individual.net> <9ulzg911gy1q.hztezq0qtfee$.dlg@40tude.net> <1oq6oggi7rtzj.4u4yyq6m8r74$.dlg@40tude.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx03.eternal-september.org; posting-host="dFCm8HWntFqmDIilBLqEJQ"; logging-data="15452"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX190o40xV7o+adMA1kkasm+5RAxhdaSuSTQ=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (darwin) Cancel-Lock: sha1:cawztXe0Z8Jy2hi80O+zW7fa8gA= sha1:fJ+BGOQz8AGrGWo3AvAjoyIPEoQ= Xref: g2news2.google.com comp.lang.ada:17181 Date: 2010-12-28T22:39:31+00:00 List-Id: "Dmitry A. Kazakov" writes: > Yes, the TSC can be read any time, and, if I correctly remember, each > reading will give a new value. PPC RT clock is also reliable. > > There could be certain issues for multi-core processors, you should > take care that the task synchronizing the counter with UTC would not > jump from core to core. Alternatively you should synchronize clocks of > individual cores. Using the TSC on a MacBook Pro gives very unreliable results (I rather think the core you're using goes to sleep and you may or may not wake up using the same core!). However, the system clock (Ada.Calendar) is precise to a microsecond.