1 /**
2 * .
3 * Copyright � 1999 Erich P G.
4 *
5 */
6
7 package autohit.vm;
8
9 import java.io.Serializable;
10
11 /**
12 * A Virtual Machine instruction. This instruction impliments a WAIT. The
13 * VM will stall the Sim for the specified time measured in milliseconds.
14 *
15 * @see autohit.vm.VMInstruction
16 * @see autohit.Sim
17 *
18 * @author Erich P. Gatejen
19 * @version 1.0
20 * <i>Version History</i>
21 * <code>EPG - Initial - 5Jan99</code>
22 *
23 */
24 public class VMIWait extends VMInstruction {
25
26 // --- FINAL FIELDS ------------------------------------------------------
27
28 // --- FIELDS ------------------------------------------------------------
29
30 /**
31 * The length of time to wait measured in milliseconds.
32 * This is a String and not an int so that we can do variable
33 * substitution.
34 * @serial
35 */
36 public String time;
37
38 // --- PUBLIC METHODS ----------------------------------------------------
39
40 /**
41 * Default constructor.
42 */
43 public VMIWait() {
44 nToken = VMInstruction.WAIT;
45 }
46
47 /**
48 * Dump this Instruction. Mostly for debugging.
49 *
50 * @return a String containing the dump.
51 */
52 public String toString() {
53 StringBuffer d = new StringBuffer();
54 d.append(" VMIWait --------------------------- \n");
55 d.append(" time = " + time + "\n");
56 return d.toString();
57 }
58
59 // --- PRIVATE METHODS ---------------------------------------------------
60
61
62 }
|