1 Star 0 Fork 130

huifeng/cppweb

forked from 寻根/cppweb 
加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Timer.java 424 Bytes
一键复制 编辑 原始数据 按行查看 历史
寻根 提交于 2020-09-05 12:22 +08:00 . cppweb.1.0.0版本
package stdx;
public class Timer{
private long tm = System.nanoTime() / 1000;
public void reset(){
tm = System.nanoTime() / 1000;
}
public long getTimeGap(){
return System.nanoTime() / 1000 - tm;
}
public void print(){
print(null);
}
public void print(String tag){
if (tag == null || tag.isEmpty()) tag = "time cost";
System.out.print(tag + " : " + getTimeGap() + "us");
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/huifeng_github/cppweb.git
git@gitee.com:huifeng_github/cppweb.git
huifeng_github
cppweb
cppweb
master

搜索帮助