写点什么

nanoTime

0 人感兴趣 · 1 次引用

  • 最新
  • 推荐
https://static001.geekbang.org/infoq/33/33ee05925bcdf0befba7f76c92991389.jpeg?x-oss-process=image%2Fresize%2Cw_416%2Ch_234

6 种快速统计代码执行时间的方法

用户头像
Bruce Duan
2020-08-14

此方法为 Java 内置的方法,使用 System.currentTimeMillis 来统计执行的时间(统计单位:毫秒),示例代码如下:

nanoTime_nanoTime技术文章_InfoQ写作社区