码迷,mamicode.com
首页 > 其他好文 > 详细

计算函数运行时间

时间:2018-05-18 14:01:36      阅读:141      评论:0      收藏:0      [点我收藏+]

标签:out   运行时   color   class   时间   计算   style   bsp   sys   

1 long start,end;
2 start = System.currentTimeMillis();
3 for (int i = 0; i < 2000000000; i++) {}
4 end = System.currentTimeMillis(); 
5 System.out.println("Run Time:" + (end - start) + "(ms)");

 

计算函数运行时间

标签:out   运行时   color   class   时间   计算   style   bsp   sys   

原文地址:https://www.cnblogs.com/dawuge/p/9055367.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!