提交 bbe90361 编写于 作者: O ohair

6824583: regtest TimeUnit/Basic.java fails intermittently on Windows - again

Reviewed-by: dholmes
上级 5fb9c65c
......@@ -60,10 +60,11 @@ public class Basic {
equal(1000L, MICROSECONDS.toNanos(1));
long t0 = System.nanoTime();
MILLISECONDS.sleep(3);
MILLISECONDS.sleep(3); /* See windows bug 6313903, might not sleep */
long elapsedMillis = (System.nanoTime() - t0)/(1000L * 1000L);
System.out.printf("elapsed=%d%n", elapsedMillis);
check(elapsedMillis >= 3);
check(elapsedMillis >= 0);
/* Might not sleep on windows: check(elapsedMillis >= 3); */
check(elapsedMillis < 1000);
//----------------------------------------------------------------
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册