aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java b/src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java
index 447c72709..6bac1646b 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java
@@ -170,9 +170,9 @@ public class FPSAnimator extends AnimatorBase {
}
}
- public synchronized void pause() {
+ public synchronized boolean pause() {
if (timer == null) {
- throw new GLException("Not running");
+ return false;
}
stateSync.lock();
try {
@@ -183,17 +183,19 @@ public class FPSAnimator extends AnimatorBase {
} finally {
stateSync.unlock();
}
+ return true;
}
- public synchronized void resume() {
+ public synchronized boolean resume() {
if (timer == null) {
- throw new GLException("Not running");
+ return false;
}
stateSync.lock();
try {
startTask();
} finally {
stateSync.unlock();
- }
+ }
+ return true;
}
}