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
You can use System.nanoTime();
System.nanoTime();
To get the result in readable format, use TimeUnit.MILLISECONDS or NANOSECONDS
TimeUnit.MILLISECONDS or NANOSECONDS