2017-01-11 16:18:57 -08:00
|
|
|
// lowlevel/TestAbort.java
|
2020-10-07 13:35:40 -06:00
|
|
|
// (c)2020 MindView LLC: see Copyright.txt
|
2017-01-11 16:18:57 -08:00
|
|
|
// We make no guarantees that this code is fit for any purpose.
|
|
|
|
// Visit http://OnJava8.com for more book information.
|
|
|
|
import onjava.*;
|
|
|
|
|
|
|
|
public class TestAbort {
|
|
|
|
public static void main(String[] args) {
|
|
|
|
new TimedAbort(1);
|
|
|
|
System.out.println("Napping for 4");
|
2017-01-22 16:48:11 -08:00
|
|
|
new Nap(4);
|
2017-01-11 16:18:57 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
/* Output:
|
|
|
|
Napping for 4
|
2017-05-03 12:00:00 -06:00
|
|
|
TimedAbort 1.0
|
2017-01-11 16:18:57 -08:00
|
|
|
*/
|