
org.openas2.util.ProfilerStub Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of openas2-server Show documentation
Show all versions of openas2-server Show documentation
Open source implementation of the AS2 standard for signed encrypted and compressed document transfer
package org.openas2.util;
import java.util.Date;
public class ProfilerStub {
private Date endStamp;
private Date startStamp;
public ProfilerStub(Date startStamp) {
this.startStamp = startStamp;
}
public void setEndStamp(Date date) {
endStamp = date;
}
public Date getEndStamp() {
return endStamp;
}
public long getDifference() {
return getEndStamp().getTime() - getStartStamp().getTime();
}
public String getMilliseconds() {
return Long.toString(getDifference()) + " milliseconds";
}
public String getSeconds() {
long diff = getDifference() / 1000;
return Long.toString(diff) + " seconds";
}
public String getCombined() {
long diff = getDifference();
return Long.toString(diff / 1000) + "." + Long.toString(diff % 1000) + " seconds";
}
public void setStartStamp(Date date) {
startStamp = date;
}
public Date getStartStamp() {
return startStamp;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy