Re: [AD] [AL] More SGI weirdness, and XVideo PROBLEM FOUND!

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 2002-12-19, Lisa Parratt <lisa@xxxxxxxxxx> wrote:
> Right, the problem would seem to be that SGIs run timed as standard. I'm
> guessint this is interfereing with some of the clock routines?
> 
> Certainly, killing timed gives noticable improvements.
> 
> I wonder if using clock_gettime over gettimeofday may help. ISTR that all
> SGIs have more than one clock (I checked - there's CLOCK_SGI_CYCLE), the
> second of which is driven by the CPU timestamp.

I think you should try it.  Reading
http://www.chemie.fu-berlin.de/cgi-bin/man/sgi_irix?timers+5 I saw this:

                                              On every clock tick, the
  kernel updates that data structure by an amount equal to the clock tick
  (typically 10 milliseconds).  A gettimeofday() call will return the
  current value of that structure.  When timed(1M) is running, the
  gettimeofday() and time(2) results will be adjusted to match time of
  other machines running timed within a local area.

I don't know what the adjustment entails (a trip around the network?!),
but that's probably where the problem is coming from.

OTOH, the man page for clock_gettime() suggests that it is exactly what
is needed (there is a CLOCK_REALTIME which has a resolution "never worse
than 100 HZ (which equals 10 milliseconds)").


Eh, clock_gettime() is POSIX, whereas gettimeofday() is not.  And glibc
has clock_gettime(), although undocumented.  I guess I can tackle this
then, if you're too busy.

-- 
王浩禎



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/