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
Try this
long start_time = System.nanoTime(); resp = GeoLocationService.getLocationByIp(ipAddress); long end_time = System.nanoTime(); double difference = (end_time - start_time) / 1e6;