mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-16 13:32:24 +00:00
bug fix in the duration formatting.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@6022 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
5bbf6acc58
commit
7b14197de5
2 files changed
+14
-6
No files matched your search
@@ -94,10 +94,6 @@ public final class CaseResult extends TestObject implements Comparable<CaseResul
|
||||
return duration;
|
||||
}
|
||||
|
||||
public String getDurationString() {
|
||||
return Util.getTimeSpanString((long)(duration*1000));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the version of {@link #getName()} that's URL-safe.
|
||||
*/
|
||||
|
||||
@@ -2,6 +2,7 @@ package hudson.tasks.junit;
|
||||
|
||||
import hudson.model.AbstractBuild;
|
||||
import hudson.model.ModelObject;
|
||||
import hudson.Util;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@@ -21,8 +22,19 @@ public abstract class TestObject implements ModelObject, Serializable {
|
||||
*/
|
||||
public abstract TestObject getPreviousResult();
|
||||
|
||||
public abstract float getDuration();
|
||||
|
||||
/**
|
||||
* Time took to run this test. In seconds.
|
||||
*/
|
||||
public abstract float getDuration();
|
||||
|
||||
/**
|
||||
* Returns the string representation of the {@link #getDuration()},
|
||||
* in a human readable format.
|
||||
*/
|
||||
public String getDurationString() {
|
||||
return Util.getTimeSpanString((long)(getDuration()*1000));
|
||||
}
|
||||
|
||||
/**
|
||||
* Replaces URL-unasfe characters.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user