comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Any leap year issues caused by Ada yesterday?
Date: Tue, 06 Mar 2012 09:20:55 +0000
Date: 2012-03-06T09:20:55+00:00	[thread overview]
Message-ID: <m262eihyq0.fsf@pushface.org> (raw)
In-Reply-To: 18ghv3yeh1a1k$.1bjwdaps59rt3$.dlg@40tude.net

"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:

> If you set the timer at 1ms rate, you would have 1ms delays. The
> problem is that the time stamps would have only 1ms accuracy! For
> 10kHz measurements and control we are doing, this is a bit dire. So we
> are setting the timer interrupts at 0.01ms (which is our humble
> contribution to the "man-made" climate change (:-))

Our (VxWorks) solution was to use the PowerPC timebase register; at each
clock tick, store the Ada clock and the current tb; in between, use the
tb to interpolate. On the hardware we were using, that gave us 40 ns
resolution (a microsecond would have been fine!)

I couldn't show you that code even if I still had access, it's
proprietary, but there's something at [1].

An Intel equivalent used to work, but (a) most OSs give microsecond
resolution anyway, (b) it certainly doesn't work on Mac OS X with dual
cores where the core is slowed right down if it has nothing to do! (my
interpretation of the observed behaviour).

[1] http://booch95.svn.sourceforge.net/viewvc/booch95/trunk/src/bc-support-high_resolution_time-clock.adb-ppc32?revision=1415&view=markup



  reply	other threads:[~2012-03-06  9:20 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-01 13:06 Any leap year issues caused by Ada yesterday? Georg Bauhaus
2012-03-05 11:07 ` tonyg
2012-03-05 15:59   ` Shark8
2012-03-05 18:03     ` Dmitry A. Kazakov
2012-03-05 18:30       ` Simon Wright
2012-03-05 20:17         ` Dmitry A. Kazakov
2012-03-05 20:56           ` Simon Wright
2012-03-06  8:47             ` Dmitry A. Kazakov
2012-03-06  9:20               ` Simon Wright [this message]
2012-03-06 10:07                 ` Dmitry A. Kazakov
2012-03-06 10:51                   ` Georg Bauhaus
2012-03-06 11:16                     ` Dmitry A. Kazakov
2012-03-06 16:46                   ` Simon Wright
2012-03-06 17:37                     ` Dmitry A. Kazakov
2012-03-06 17:59                       ` Simon Wright
2012-03-06 19:18                         ` Dmitry A. Kazakov
2012-03-06 20:22                           ` Simon Wright
2012-03-06 19:08                       ` Shark8
2012-03-06 19:40                         ` Dmitry A. Kazakov
2012-03-06 21:00                       ` tmoran
2012-03-06 21:37                         ` Simon Wright
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox