pfVClockSync()

New Message Reply Date view Thread view Subject view Author view

Ph.D. (bro++at++ht.com)
Mon, 18 Aug 1997 11:39:09 -0400


Hi Performers,

[ This is my first posting on this list for a while. Please, excuse me
  if the question has an obvious answer. Couldn't find anything in the
  FAQ, and the mailing list archive wasn't up-to-date (ended spring 97) ]

I have a problem with the pfVClockSync() routine which I haven't
been able to understand.

I want to use the pfVClockSync() to make sure that my sproc'ed physics
process is synchronized to the Performer APP process. To do this I
call pfVClockSync before every loop. Unfortunately, I haven't been
getting the expected behaviour.

To find out exactly what was going on, I wrote the following small piece
of code:

In a sproc'ed process:

    // Start clock and set to zero
    pfStartVClock(); pfInitVClock(0);

    cerr << "Check of VClock routines:" << endl;
    cerr << " pfGetVideoRate() = " << pfGetVideoRate() << endl;

    double rtime1 = pfGetTime();

    //
    // This should make it wait 10 second
    //
    for (int j=0; j<10; j++) pfVClockSync(pfGetVideoRate(),0);

    double rtime2 = pfGetTime()-rtime1;
    cerr << " 10 seconds is equal to " << rtime2 << endl;

The result of this on an Octane (MXI) is:

    Check of VClock routines:
        pfGetVideoRate() = 72
        10 seconds is equal to 0.0003856

and on an Onyx2 (InfiniteReality2) is:

    Check of VClock routines:
        pfGetVideoRate() = 72
        10 seconds is equal to 0.000392

I just don't understand it. I don't get the 10 seconds I was expecting.
What am I doing wrong?

Thanks, Morten

Compiled and run with

    Octane (Compile on Indigo II Extreme, run on Octane)
        I performer_dev 06/05/97 Performer2.0 Development Software
        I performer_eoe 04/18/97 Performer2.0.4 Execution Environment

    Onyx2
        I performer_dev 07/10/97 Performer2.2 Development Software
        I performer_eoe 07/10/97 Performer2.2 Execution Environment

-- 
                              ,,,
                             (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.