当前位置: 技术问答>java相关
50分求解,关于package的问题
来源: 互联网 发布时间:2017-05-02
本文导语: TimeBeam.java---------------------------------------------- package com.tag.lib.wdjsp.components; public class TimeBean { private long start; public TimeBean() { start = System.currentTimeMillis(); } public long getElapsedMillis() { long now = System.currentTimeM...
TimeBeam.java----------------------------------------------
package com.tag.lib.wdjsp.components;
public class TimeBean {
private long start;
public TimeBean() {
start = System.currentTimeMillis();
}
public long getElapsedMillis() {
long now = System.currentTimeMillis();
return now-start;
}
public long getElapsedSeconds() {
return (long)this.getElapsedMillis() / 1000;
}
public long getElapsedMinutes() {
return (long)this.getElapsedMillis() / 60000;
}
public void reset() {
start = System.currentTimeMillis();
}
public void setStartTime(long time) {
if (time
package com.tag.lib.wdjsp.components;
public class TimeBean {
private long start;
public TimeBean() {
start = System.currentTimeMillis();
}
public long getElapsedMillis() {
long now = System.currentTimeMillis();
return now-start;
}
public long getElapsedSeconds() {
return (long)this.getElapsedMillis() / 1000;
}
public long getElapsedMinutes() {
return (long)this.getElapsedMillis() / 60000;
}
public void reset() {
start = System.currentTimeMillis();
}
public void setStartTime(long time) {
if (time