Because fields check the time to prevent cyclical routes.

Please see Field.java void route() method.

Regards,
______________________________________
Rick Goldberg - Member Technical Staff
Sun Microsystems
Graphics Products - Computer Systems
901 San Antonio Road, MS UMPK27-302
Palo Alto, CA 94043-4900
650 786-0108 Direct
650 856-2114 Fax
[EMAIL PROTECTED]

> From: giles <[EMAIL PROTECTED]>
> To: "'Discussion list for Java 3D API'" <[EMAIL PROTECTED]>
> Cc: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> Subject: VRML Question
> Date: Tue, 15 Feb 2000 20:16:52 -0600
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
>
> 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