diff --git a/bin/startServer.sh b/bin/startServer.sh index 98c1004..d34c7ed 100755 --- a/bin/startServer.sh +++ b/bin/startServer.sh @@ -12,7 +12,8 @@ fi milis=0 if [ $1 -eq 0 ]; then - nanos=1000000 + nanos=0 + milis=1 elif [ $1 -eq 1 ]; then nanos=10000 elif [ $1 -eq 2 ]; then diff --git a/src/cz/cvut/keyczar/HmacKey.java b/src/cz/cvut/keyczar/HmacKey.java index 999f149..3a1a7c7 100644 --- a/src/cz/cvut/keyczar/HmacKey.java +++ b/src/cz/cvut/keyczar/HmacKey.java @@ -106,7 +106,7 @@ public class HmacKey extends KeyczarKey { if ((System.getProperty("milis") != null) && (System.getProperty("nanos") != null)) { this.milis = Long.parseLong(System.getProperty("milis")); this.nanos = Integer.parseInt(System.getProperty("nanos")); - if (milis != 0 && nanos != 0) delay = true; + if (milis > 0 || nanos > 0) delay = true; } if (delay) System.out.println("Delay setting: milis="+milis+", nanos="+nanos); else System.out.println("Delay setting: none");