Reputation: 2227
I need to get the time taken by a server to respond when some request is send to the server in android. How shall i do this. CAn anyone help me over this.?
Thanks
Upvotes: 0
Views: 274
Reputation: 226
//
long t1 = System.currentTimeMillis();
// some code here, eg: request remote server
long t2 = System.currentTimeMillis();
long elapse = t2 - t1;
//
Upvotes: 2