Calculating time difference in Milliseconds

前端 未结 9 520
谎友^
谎友^ 2020-12-04 21:42

I am making a call to a method by passing ipAddress and it will return back the location of ipAddress like Country, City, etc etc. So I was trying to see how much time it is

9条回答
  •  粉色の甜心
    2020-12-04 22:10

    In such a small cases where difference is less than 0 milliseconds you can get difference in nano seconds as well.

    System.nanoTime()
    

提交回复
热议问题