diff options
| author | Rajith Muditha Attapattu <rajith@apache.org> | 2007-11-13 16:46:52 +0000 |
|---|---|---|
| committer | Rajith Muditha Attapattu <rajith@apache.org> | 2007-11-13 16:46:52 +0000 |
| commit | bbc7853c8deda6f064fb15d0fb12cd42ab129206 (patch) | |
| tree | f3d7b13289407393f8d643dd42da4bf6cc7060ae /java/perftests/src | |
| parent | 4590ae70dcd546856e419339df18dedb8fe909e7 (diff) | |
| download | qpid-python-bbc7853c8deda6f064fb15d0fb12cd42ab129206.tar.gz | |
Fixed an error in the printTestDuration method
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@594577 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/perftests/src')
| -rw-r--r-- | java/perftests/src/main/java/org/apache/qpid/client/perf/Options.java | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/java/perftests/src/main/java/org/apache/qpid/client/perf/Options.java b/java/perftests/src/main/java/org/apache/qpid/client/perf/Options.java index 1bcf04ae4a..ee22b6804b 100644 --- a/java/perftests/src/main/java/org/apache/qpid/client/perf/Options.java +++ b/java/perftests/src/main/java/org/apache/qpid/client/perf/Options.java @@ -47,16 +47,22 @@ public class Options private String printTestDuration() { StringBuffer buf = new StringBuffer(); - int hours = (int)_expiry/(60*60*1000); - int mins = (int)_expiry/(60*1000); - int secs = (int)_expiry/1000; + long temp = _expiry; + int hours = (int)temp/(60*60*1000); + temp = temp -hours*60*60*1000; + + int mins = (int)(temp)/(60*1000); + temp = temp -mins*60*1000; + + int secs = (int)temp/1000; + if (hours > 0) { - buf.append(hours).append(" hours, "); + buf.append(hours).append(" hours "); } if (mins > 0) { - buf.append(mins).append(" mins, "); + buf.append(mins).append(" mins "); } if (secs > 0) { |
