Geoffrey Keating writes: > > On 11/09/2006, at 3:59 PM, Andrew Pinski wrote: > > >> > >> Geoff, > >> Did you notice that a new libjava regression occured today on > >> Darwin > >> apparently after revision 116838 but by revision 116843? The > >> testcase... > >> > >> FAIL: Thread_Sleep -O3 -findirect-dispatch output - bytecode- > >> >native test > >> > >> now fails. Could this be related to your change... > > > > This is just a timeout. > > It's actually an timing-dependent infinite loop, or at least that's > what I remember from the last time I looked at it several years ago.
No, it isn't: public static void main(String args[]) { try { long start = System.currentTimeMillis(); System.out.println("sleeping"); Thread.sleep(50); long end = System.currentTimeMillis(); if ((end - start) < 50) System.out.println ("failed"); else System.out.println("ok"); } catch (InterruptedException x) { System.out.println("error: Thread interrupted."); } } Andrew.