diff -r bc6f3be91306 -r e5cc7edead25 emul/compact/src/main/java/java/util/concurrent/TimeUnit.java --- a/emul/compact/src/main/java/java/util/concurrent/TimeUnit.java Fri Feb 01 16:10:10 2013 +0100 +++ b/emul/compact/src/main/java/java/util/concurrent/TimeUnit.java Fri Feb 01 16:25:57 2013 +0100 @@ -334,14 +334,14 @@ * or equal to zero, do not wait at all. * @throws InterruptedException if interrupted while waiting */ - public void timedJoin(Thread thread, long timeout) - throws InterruptedException { - if (timeout > 0) { - long ms = toMillis(timeout); - int ns = excessNanos(timeout, ms); - thread.join(ms, ns); - } - } +// public void timedJoin(Thread thread, long timeout) +// throws InterruptedException { +// if (timeout > 0) { +// long ms = toMillis(timeout); +// int ns = excessNanos(timeout, ms); +// thread.join(ms, ns); +// } +// } /** * Performs a {@link Thread#sleep(long, int) Thread.sleep} using @@ -357,7 +357,10 @@ if (timeout > 0) { long ms = toMillis(timeout); int ns = excessNanos(timeout, ms); - Thread.sleep(ms, ns); + Object o = new Object(); + synchronized (o) { + o.wait(ms, ns); + } } }