We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9533d7e commit 90a7ee4Copy full SHA for 90a7ee4
1 file changed
test/org/lwjgl/opengl/awt/CompareScreenshotTest.java
@@ -284,9 +284,11 @@ public void run() {
284
// Some Operating Systems have a window open/close animation, so we wait until the screenshot is stable
285
while (true) {
286
// Pause at least 500 milliseconds between captures
287
- long pauseStartTime = System.currentTimeMillis();
288
- while (System.currentTimeMillis() - pauseStartTime < 500) {
289
- Thread.yield();
+ try {
+ Thread.sleep(500);
+ } catch (InterruptedException e) {
290
+ Thread.currentThread().interrupt();
291
+ throw new RuntimeException("Thread interrupted during screenshot delay", e);
292
}
293
294
BufferedImage s = rbt.createScreenCapture(frameBounds);
0 commit comments