package nxm.sys.test;

import nxm.sys.lib.Primitive;
import nxm.sys.lib.Time;

/** Primitive used to test Bug 2150.
    @author  J. Czechowski IV / J. Bauer
 */
public class test_interrupt extends Primitive {

  /** default constructor */
  public test_interrupt () {}

  public int open() {
    M.info("This primitive should pause until the user hits CTRL+C a single time");
    while (true) {
      if (getInterrupt()) return ABORT;
      Time.sleep(0.1);
    }
    //return NORMAL;
  }

  public int process () {
    M.warning("IN PROCESS LOOP....SHOULD NOT BE HERE!");
    return FINISH;
  }

}
