From 604a8f36d99afb5e4d3c80596ba53f9987fbc26f Mon Sep 17 00:00:00 2001 From: Peter Boraros Date: Wed, 9 Nov 2011 02:32:22 +0100 Subject: [PATCH] Issues with timing. --- bin/startServer.sh | 3 ++- src/cz/cvut/keyczar/HmacKey.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) 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");