equal
deleted
inserted
replaced
159 Date now = new Date(); |
159 Date now = new Date(); |
160 if (t == null && duration == -1) { |
160 if (t == null && duration == -1) { |
161 return; |
161 return; |
162 } |
162 } |
163 long change = (t.getTime() - System.currentTimeMillis()) / 1000; |
163 long change = (t.getTime() - System.currentTimeMillis()) / 1000; |
164 if (change > duration + 20 || change < duration - 20) { |
164 //accounting the delay factor in processing the instructions on host mc |
165 throw new Exception(t + " is not " + duration); |
165 if (change > duration + 40 || change < duration - 40) { |
|
166 throw new Exception("Timestamp is " + t + ", actual difference " |
|
167 + change + " is not " + duration); |
166 } |
168 } |
167 } |
169 } |
168 } |
170 } |