In the time.java file the getNow() method has a comment that says:  "Make
sure we don't ever return the same timestamp for two seperate calls."  Can
someone explain why?  I'm trying to set route times in my code and I'm
using the time.getNow to set the startTime of a AudioClip.  I can't get it
to start exactly on the next frame.  I've already accounted for the
RelTimeBase from browser, but I was wondering if I can remove the
curTimeMillis++.  It smacks of fixing a timing problem some place.  Anyone
remeber why it was put in there?



    public static double getNow() {
        long curTimeMillis = System.currentTimeMillis();

        // Make sure we don't ever return the same timestamp for two
        // separate calls
        if (curTimeMillis == lastTimeMillis) {
            curTimeMillis++;
        }
        lastTimeMillis = curTimeMillis;

        return ((curTimeMillis / 1000.0)-systemInit);

    }

-Alan

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to