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 | ed240c2fd6bceb51fa8ec93ad1088b4734f20ca2 (patch) | |
| tree | 887f72ab4ca37abe8edd13be3518f3c21372bad1 /qpid/java/perftests | |
| parent | 0e3c42c0b76814f4a92e4b52d14eb677d5f6c01c (diff) | |
| download | qpid-python-ed240c2fd6bceb51fa8ec93ad1088b4734f20ca2.tar.gz | |
Fixed an error in the printTestDuration method
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@594577 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/perftests')
| -rw-r--r-- | qpid/java/perftests/src/main/java/org/apache/qpid/client/perf/Options.java | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/qpid/java/perftests/src/main/java/org/apache/qpid/client/perf/Options.java b/qpid/java/perftests/src/main/java/org/apache/qpid/client/perf/Options.java index 1bcf04ae4a..ee22b6804b 100644 --- a/qpid/java/perftests/src/main/java/org/apache/qpid/client/perf/Options.java +++ b/qpid/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) { |
