Re: pfVClockSync()

New Message Reply Date view Thread view Subject view Author view

Ph.D. (bro++at++ht.com)
Mon, 18 Aug 1997 17:46:54 -0400


> > //
> > // This should make it wait 10 second
> > //
> > for (int j=0; j<10; j++) pfVClockSync(pfGetVideoRate(),0);
> >
>
> This just calls the function pfVClockSync ten times. You are
> measuring how fast that this call can be made. From your
> results it looks like it takes about 38 microseconds for the
> call to complete.

Hi Ken,

As I understand the pfVClockSync routine, it will wait until
the 'count' (number of video retraces - 72 times/sec in this case)
modulu pfGetVideoRate() (=72) is equal to zero. In other words
it sleeps until the next 72 video-retrace-boundary.

Assuming that the first time it is lucky and hits the 72-count
quickly. It will then return immediately.

But the following calls should all wait about 1 second. In total around
9-10 seconds.

According to the man-page, if it hits the boundary straight-away it
will wait until the next:

man: If the retrace count modulo rate is equal to offset at the time
     pfVClockSync is called, the caller will not return immediately but will
     go to sleep until rate ticks later.

Or am I misunderstanding this ?

Thanks for answering
--Morten

-- 
                              ,,,
                             (o o)
-------------------------oOO--(_)--OOo------------------------------
Morten Bro-Nielsen, PhD          E-mail:                  bro++at++ht.com 
Senior Scientist                 HT WWW:           http://www.ht.com
HT Medical, Inc.                 Private: http://www.imm.dtu.dk/~bro
6001 Montrose Road, Suite 902             http://www.imm.dtu.dk/~mvox
Rockville, MD 20852, USA         Phone: +1(301)984-3706  Fax: ..-2104
-------------- Creator of Surgery Simulation Systems ----------------

======================================================================= List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/ Submissions: info-performer++at++sgi.com Admin. requests: info-performer-request++at++sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:55:45 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.