privatestaticclass Timer { privatelong time = System.currentTimeMillis(); long update() { long t = System.currentTimeMillis(); long diff = t - time;
time = t; return diff;
} long print() { long t = update();
System.out.println("Elapsed time: " + t + " ms."); return t;
}
}
privatestaticboolean isFalse(boolean b) throws Exception { if (b) { thrownew Exception("not false");
} return b;
}
privatestaticboolean isTrue(boolean b) throws Exception { if (!b) { thrownew Exception("not true");
} return b;
}
publicstaticvoid main(String[] args) throws Exception {
CardTerminal terminal = getTerminal(args); if (terminal == null) {
System.out.println("Skipping the test: " + "no card terminals available"); return;
}
while (terminal.isCardPresent()) {
System.out.println("*** Remove card!"); Thread.sleep(1000);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.