![JAR search and dependency download from the Maven repository](/logo.png)
link.jfire.testsupport.time.Timewatch Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jfire-testsupport Show documentation
Show all versions of jfire-testsupport Show documentation
Testsupport is test of jfire system support framework
The newest version!
package link.jfire.testsupport.time;
/**
* 时间观察类
*
* @author 林斌([email protected])
*
*/
public class Timewatch
{
private long t0 = System.currentTimeMillis();
private long t1 = System.currentTimeMillis();
/**
* 开始计时
*/
public void start()
{
t0 = System.currentTimeMillis();
}
/**
* 结束计时
*/
public void end()
{
t1 = System.currentTimeMillis();
}
/**
* 返回统计时间
*
* @return
*/
public long getTotal()
{
return t1 - t0;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy