Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / libjava / testsuite / libjava.lang / Thread_Sleep.java
blob7220a6a3a6a364475cbd160cf4c0c9897882ba5c
1 // Test that Thread.sleep() works.
3 public class Thread_Sleep
5 public static void main(String args[])
7 try
9 long start = System.currentTimeMillis();
10 System.out.println("sleeping");
11 Thread.sleep(50);
12 long end = System.currentTimeMillis();
13 if ((end - start) < 50)
14 System.out.println ("failed");
15 else
16 System.out.println("ok");
18 catch (InterruptedException x)
20 System.out.println("error: Thread interrupted.");