58,454
社区成员
发帖
与我相关
我的任务
分享
public class Test
{
public static void main(String[] args)
{
long start=System.currentTimeMillis();
//以下是你要干的事儿了,例如这个
for(int i = 0; i < 100000000; i ++)
{
}
///////////////////////
long end=System.currentTimeMillis();
//这就是你运行了多久
System.out.println(end - start);
}
}