aboutsummaryrefslogtreecommitdiff
path: root/examples/Counter.java
diff options
context:
space:
mode:
authorjestin2003-01-07 17:13:08 +0000
committerjestin2003-01-07 17:13:08 +0000
commit603599544c1720e796dc622c98e5ca0fd22b8e17 (patch)
treee21a0ab232c10726461e387881a7a8448ecca2ca /examples/Counter.java
parent781512114b4c304f3c72af251e4f416767afe20a (diff)
downloadivy-java-603599544c1720e796dc622c98e5ca0fd22b8e17.zip
ivy-java-603599544c1720e796dc622c98e5ca0fd22b8e17.tar.gz
ivy-java-603599544c1720e796dc622c98e5ca0fd22b8e17.tar.bz2
ivy-java-603599544c1720e796dc622c98e5ca0fd22b8e17.tar.xz
Adaptés à une plus vieille JDK
Diffstat (limited to 'examples/Counter.java')
-rw-r--r--examples/Counter.java16
1 files changed, 11 insertions, 5 deletions
diff --git a/examples/Counter.java b/examples/Counter.java
index a1dffd1..34ae576 100644
--- a/examples/Counter.java
+++ b/examples/Counter.java
@@ -1,20 +1,25 @@
/**
- * Yet another Ivy java program example
+ * Counter:Yet another Ivy java program example.
+ *
+ * @author Yannick Jestin
+ * @author <a href="http://www.tls.cena.fr/products/ivy/">http://www.tls.cena.fr/products/ivy/</a>
*
* a software bus message "geiger counter" displaying each and every second
* the number of messages sent on the bus during the past second, the past ten
* seconds and the past minute.
*
- * @author Yannick Jestin
- * @author <a href="http://www.tls.cena.fr/products/ivy/">http://www.tls.cena.fr/products/ivy/</a>
- *
* (c) CENA 1998-2003
* This program is provided as is, under the LGPL licence with the ivy-java
* package.
*
+ * New:
+ * 1.2.3: use of Vector.addElement instead of add() and the old Properties
+ * model
+ *
*/
import fr.dgac.ivy.* ;
import gnu.getopt.Getopt ;
+import java.util.*;
/**
* A program to count to the Ivy software bus messages.
@@ -92,7 +97,8 @@ public class Counter implements IvyMessageListener, Runnable {
domain=opt.getOptarg();
break;
case 'd':
- System.setProperty("IVY_DEBUG","yesla!");
+ Properties sysProp = System.getProperties();
+ sysProp.put("IVY_DEBUG","yes");
break;
case 'h':
default: