Skip to content

Commit

Permalink
FPSAnimator: Add note on deamon-thread and JVM shutdown behavior.
Browse files Browse the repository at this point in the history
  • Loading branch information
sgothel committed Nov 25, 2012
1 parent f24844c commit cc5fb8d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/jogl/classes/com/jogamp/opengl/util/Animator.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@
* so it is able to keep an application from terminating.<br>
* Call {@link #stop() } to terminate the animation and it's execution thread.
* </p>
*/

*/
public class Animator extends AnimatorBase {
/** timeout in milliseconds, 15 frames @ 60Hz = 240ms, limiting {@link #finishLifecycleAction(Condition)} */
private static final long TO_WAIT_FOR_FINISH_LIFECYCLE_ACTION = 15*16;
Expand Down
13 changes: 10 additions & 3 deletions src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,16 @@
import java.util.*;
import javax.media.opengl.*;

/** An Animator subclass which attempts to achieve a target
frames-per-second rate to avoid using all CPU time. The target FPS
is only an estimate and is not guaranteed. */
/**
* An Animator subclass which attempts to achieve a target
* frames-per-second rate to avoid using all CPU time. The target FPS
* is only an estimate and is not guaranteed.
* <p>
* The Animator execution thread does not run as a daemon thread,
* so it is able to keep an application from terminating.<br>
* Call {@link #stop() } to terminate the animation and it's execution thread.
* </p>
*/
public class FPSAnimator extends AnimatorBase {
private Timer timer = null;
private TimerTask task = null;
Expand Down

0 comments on commit cc5fb8d

Please sign in to comment.